ponder 0.8.27 → 0.8.28

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.
@@ -8732,7 +8732,7 @@ var createHistoricalSync = async (args) => {
8732
8732
  if (logIds.has(id)) {
8733
8733
  args.common.logger.warn({
8734
8734
  service: "sync",
8735
- msg: `Detected invalid eth_getLogs response. Duplicate log for block ${log.blockHash} with index ${log.logIndex}.`
8735
+ msg: `Detected invalid eth_getLogs response. Duplicate log index ${log.logIndex} for block ${log.blockHash}.`
8736
8736
  });
8737
8737
  } else {
8738
8738
  logIds.add(id);
@@ -9638,12 +9638,22 @@ var createRealtimeSync = (args) => {
9638
9638
  "Detected invalid eth_getLogs response. `block.logsBloom` is not empty but zero logs were returned."
9639
9639
  );
9640
9640
  }
9641
+ const logIds = /* @__PURE__ */ new Set();
9641
9642
  for (const log of logs) {
9642
9643
  if (log.blockHash !== block.hash) {
9643
9644
  throw new Error(
9644
9645
  `Detected invalid eth_getLogs response. 'log.blockHash' ${log.blockHash} does not match requested block hash ${block.hash}`
9645
9646
  );
9646
9647
  }
9648
+ const id = `${log.blockHash}-${log.logIndex}`;
9649
+ if (logIds.has(id)) {
9650
+ args.common.logger.warn({
9651
+ service: "sync",
9652
+ msg: `Detected invalid eth_getLogs response. Duplicate log index ${log.logIndex} for block ${log.blockHash}.`
9653
+ });
9654
+ } else {
9655
+ logIds.add(id);
9656
+ }
9647
9657
  if (block.transactions.find((t) => t.hash === log.transactionHash) === void 0) {
9648
9658
  if (log.transactionHash === zeroHash2) {
9649
9659
  args.common.logger.warn({