*Update dist

This commit is contained in:
Derrick Hammer 2022-09-09 06:05:13 -04:00
parent 46f693a1f2
commit a3cb70fa24
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 14 additions and 1 deletions

View File

@ -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"}

13
dist/query/wisdom.js vendored
View File

@ -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) {