ponder 0.8.9 → 0.8.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.
@@ -9577,7 +9577,8 @@ function shouldRetry(error) {
9577
9577
  // src/sync/index.ts
9578
9578
  import {
9579
9579
  hexToBigInt as hexToBigInt7,
9580
- hexToNumber as hexToNumber7
9580
+ hexToNumber as hexToNumber7,
9581
+ toHex as toHex2
9581
9582
  } from "viem";
9582
9583
 
9583
9584
  // src/utils/order.ts
@@ -10262,12 +10263,17 @@ var syncDiagnostic = async ({
10262
10263
  }) => {
10263
10264
  const start2 = Math.min(...sources.map(({ filter }) => filter.fromBlock ?? 0));
10264
10265
  const end = sources.some(({ filter }) => filter.toBlock === void 0) ? void 0 : Math.max(...sources.map(({ filter }) => filter.toBlock));
10265
- const [remoteChainId, startBlock, endBlock, latestBlock] = await Promise.all([
10266
+ const [remoteChainId, startBlock, latestBlock] = await Promise.all([
10266
10267
  requestQueue.request({ method: "eth_chainId" }),
10267
10268
  _eth_getBlockByNumber(requestQueue, { blockNumber: start2 }),
10268
- end === void 0 ? void 0 : _eth_getBlockByNumber(requestQueue, { blockNumber: end }),
10269
10269
  _eth_getBlockByNumber(requestQueue, { blockTag: "latest" })
10270
10270
  ]);
10271
+ const endBlock = end === void 0 ? void 0 : end > hexToBigInt7(latestBlock.number) ? {
10272
+ number: toHex2(end),
10273
+ hash: "0x",
10274
+ parentHash: "0x",
10275
+ timestamp: toHex2(maxCheckpoint.blockTimestamp)
10276
+ } : await _eth_getBlockByNumber(requestQueue, { blockNumber: end });
10271
10277
  if (hexToNumber7(remoteChainId) !== network.chainId) {
10272
10278
  common.logger.warn({
10273
10279
  service: "sync",