@eclesia/indexer-engine 2.5.9 → 2.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuC,WAAW,EAA4B,MAAM,wBAAwB,CAAC;AAkBpH,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAc,oBAAoB,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAI5G,eAAO,MAAM,oBAAoB;;;;;cAKX,oBAAoB,CAAC,UAAU,CAAC;;;;;;;8BAO1B,OAAO;CAClC,CAAC;AAEF,qBAAa,cAAe,SAAQ,cAAc;IAChD,OAAO,CAAC,MAAM,CAAuB;IAErC,OAAO,CAAC,OAAO,CAAkB;IAEjC,OAAO,CAAC,UAAU,CAAa;IAE/B,OAAO,CAAC,YAAY,CAAU;IAE9B,OAAO,CAAC,eAAe,CAAU;IAEjC,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO,CAAC,UAAU,CAAK;IAEhB,MAAM,EAAG,WAAW,CAAC;IAErB,WAAW,EAAG,WAAW,CAAC;IAE1B,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC;IAE3B,OAAO,CAAC,SAAS,CAAiC;IAElD,OAAO,CAAC,WAAW,CAEjB;IAEF,OAAO,CAAC,YAAY,CAA6D;gBAErE,MAAM,EAAE,oBAAoB;IAyDxC,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,aAAa,CAInB;IAEF,OAAO,CAAC,SAAS;IAQJ,OAAO;IAcP,KAAK;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/indexer/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuC,WAAW,EAA4B,M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CAiD3B"}
|
package/dist/indexer/index.js
CHANGED
|
@@ -230,7 +230,7 @@ class EcleciaIndexer extends emitter_1.EclesiaEmitter {
|
|
|
230
230
|
if (this.isMinimal(this.blockQueue)) {
|
|
231
231
|
const toProcess = await this.blockQueue.dequeue();
|
|
232
232
|
this.log.silly("Retrieved block data");
|
|
233
|
-
if (!toProcess) {
|
|
233
|
+
if (!toProcess || !toProcess[0] || !toProcess[1]) {
|
|
234
234
|
throw new Error("Could not fetch block");
|
|
235
235
|
}
|
|
236
236
|
height = toProcess[0].block.header.height;
|
|
@@ -240,7 +240,7 @@ class EcleciaIndexer extends emitter_1.EclesiaEmitter {
|
|
|
240
240
|
else {
|
|
241
241
|
const toProcess = await this.blockQueue.dequeue();
|
|
242
242
|
this.log.silly("Retrieved block data");
|
|
243
|
-
if (!toProcess) {
|
|
243
|
+
if (!toProcess || !toProcess[0] || !toProcess[1] || !toProcess[2]) {
|
|
244
244
|
throw new Error("Could not fetch block");
|
|
245
245
|
}
|
|
246
246
|
this.log.silly("Decoded block");
|
|
@@ -296,7 +296,11 @@ class EcleciaIndexer extends emitter_1.EclesiaEmitter {
|
|
|
296
296
|
if (this.retryCount < 3) {
|
|
297
297
|
this.log.debug("Indexer retryCount: " + this.retryCount);
|
|
298
298
|
this.log.info("Indexer is restarting");
|
|
299
|
-
this.start();
|
|
299
|
+
setTimeout(() => this.start(), this.retryCount * 5000);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this.log.info("Indexer failed too many times. Exiting.");
|
|
303
|
+
process.exit(1);
|
|
300
304
|
}
|
|
301
305
|
}
|
|
302
306
|
async processBlock(block, block_results, validators) {
|