@xyo-network/xl1-protocol-sdk 1.21.8 → 1.21.10

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.
@@ -4619,7 +4619,7 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
4619
4619
  remainingBlockMap.length === remainingBlocks.length,
4620
4620
  () => `remainingBlockMap length should match remainingBlocks length [${remainingBlockMap.length}/${remainingBlocks.length}]`
4621
4621
  );
4622
- const validationResults = await this.blockValidationViewer.validateBlocks(remainingBlocks, { value: true, state: false });
4622
+ const validationResults = remainingBlocks.map((b) => b);
4623
4623
  for (const [i, r] of validationResults.entries()) {
4624
4624
  const validated = isHydratedBlockWithHashMeta(r);
4625
4625
  if (!validated) {
@@ -4676,15 +4676,20 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
4676
4676
  return [isPayloadBundle(p) ? await bundledPayloadToHydratedBlock(p) : void 0, p];
4677
4677
  }));
4678
4678
  return blockBundles.map(([block, bundle3]) => {
4679
- const result = [block ? block[0].chain === chainId && block[0].block > headNumber && isSignedHydratedBlockWithHashMeta(block) ? block : void 0 : void 0, bundle3];
4680
- if (result[0] === void 0) {
4679
+ const blockCheckPassed = !!block;
4680
+ const chainIdPassed = blockCheckPassed ? block[0].chain === chainId : false;
4681
+ const blockNumberPassed = blockCheckPassed ? block[0].block > headNumber : false;
4682
+ const typeCheckPassed = blockCheckPassed ? isSignedHydratedBlockWithHashMeta(block) : false;
4683
+ const validationPassed = blockCheckPassed && chainIdPassed && blockNumberPassed && typeCheckPassed;
4684
+ const validatedBlock = validationPassed ? block : void 0;
4685
+ if (!validationPassed) {
4681
4686
  this.logger?.info(`Pruning block bundle ${bundle3._hash} during simpleValidationCheck`);
4682
- this.logger?.info(` - chainId match: ${block ? block[0].chain === chainId : "n/a"}`);
4683
- this.logger?.info(` - headNumber check: ${block ? block[0].block > headNumber : "n/a"}`);
4684
- this.logger?.info(` - isSignedHydratedBlockWithHashMeta: ${block ? isSignedHydratedBlockWithHashMeta(block) : "n/a"}`);
4685
- this.logger?.info(` - block value: ${block ? JSON.stringify(block, null, 2) : "n/a"}`);
4687
+ this.logger?.info(` - chainId match: ${chainIdPassed}`);
4688
+ this.logger?.info(` - blockNumber check: ${blockNumberPassed}`);
4689
+ this.logger?.info(` - typeCheck: ${typeCheckPassed}`);
4690
+ this.logger?.info(` - bundle hash: ${bundle3._hash}`);
4686
4691
  }
4687
- return result;
4692
+ return [validatedBlock, bundle3];
4688
4693
  });
4689
4694
  }
4690
4695
  };