*Update dist
This commit is contained in:
parent
46f693a1f2
commit
a3cb70fa24
|
@ -1 +1 @@
|
||||||
{"version":3,"file":"wisdom.d.ts","sourceRoot":"","sources":["../../src/query/wisdom.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,WAAW,CAAC;AAcrC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,MAAM,CAAK;IAEnB,SAAS,CAAC,cAAc,IAAI,IAAI;IA6ChC,OAAO,CAAC,KAAK;IAWb,SAAS,CAAC,SAAS,IAAI,MAAM,EAAE,GAAG,EAAE;CAGrC"}
|
{"version":3,"file":"wisdom.d.ts","sourceRoot":"","sources":["../../src/query/wisdom.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,WAAW,CAAC;AAcrC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,MAAM,CAAK;IAEnB,SAAS,CAAC,cAAc,IAAI,IAAI;IA0DhC,OAAO,CAAC,KAAK;IAWb,SAAS,CAAC,SAAS,IAAI,MAAM,EAAE,GAAG,EAAE;CAGrC"}
|
|
@ -24,6 +24,19 @@ export default class WisdomRpcQuery extends RpcQueryBase {
|
||||||
output[hash]++;
|
output[hash]++;
|
||||||
return output;
|
return output;
|
||||||
}, {});
|
}, {});
|
||||||
|
if (!Object.keys(responses).length) {
|
||||||
|
if (Object.keys(this._errors).length) {
|
||||||
|
this.resolve({ error: Object.values(this._errors).pop() });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this._tries <= this._maxTries) {
|
||||||
|
this._tries++;
|
||||||
|
this.retry();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.resolve({ data: { error: ERR_MAX_TRIES_HIT } });
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (const responseHash in responses) {
|
for (const responseHash in responses) {
|
||||||
if (responses[responseHash] / responseStoreData.length >=
|
if (responses[responseHash] / responseStoreData.length >=
|
||||||
this._network.majorityThreshold) {
|
this._network.majorityThreshold) {
|
||||||
|
|
Loading…
Reference in New Issue