*Reformat
This commit is contained in:
parent
55a0684628
commit
091240fe3e
|
@ -17,7 +17,7 @@ export default class RpcNetwork {
|
||||||
|
|
||||||
constructor(dht = new DHT()) {
|
constructor(dht = new DHT()) {
|
||||||
this._dht = dht;
|
this._dht = dht;
|
||||||
this._ready = this._dht.ready()
|
this._ready = this._dht.ready();
|
||||||
}
|
}
|
||||||
|
|
||||||
get ready(): Promise<void> {
|
get ready(): Promise<void> {
|
||||||
|
|
|
@ -93,7 +93,10 @@ export default class RpcQuery {
|
||||||
responses[responseIndex]++;
|
responses[responseIndex]++;
|
||||||
}
|
}
|
||||||
for (const responseIndex in responses) {
|
for (const responseIndex in responses) {
|
||||||
if (responses[responseIndex] / responseStoreKeys.length >= this._network.majorityThreshold) {
|
if (
|
||||||
|
responses[responseIndex] / responseStoreKeys.length >=
|
||||||
|
this._network.majorityThreshold
|
||||||
|
) {
|
||||||
const response: RPCResponse | null =
|
const response: RPCResponse | null =
|
||||||
responseStore[responseStoreKeys[parseInt(responseIndex, 10)]];
|
responseStore[responseStoreKeys[parseInt(responseIndex, 10)]];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue