We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e42409 commit c47e5c8Copy full SHA for c47e5c8
lib/blockchain/ethereum.go
@@ -1385,6 +1385,10 @@ func (e *EthereumClient) startHeaderPolling() error {
1385
for blockNum := lastHeaderNumber + 1; blockNum <= latestHeader.Number.Uint64(); blockNum++ {
1386
// Create a new context with timeout for each HeaderByNumber call
1387
blockCtx, blockCancel := context.WithTimeout(context.Background(), e.NetworkConfig.Timeout.Duration)
1388
+ if blockNum > math.MaxInt64 {
1389
+ e.l.Error().Int64("Chain Id", e.GetChainID().Int64()).Uint64("BlockNumber", blockNum).Msg("blockNum exceeds the maximum value for int64")
1390
+ continue
1391
+ }
1392
header, err := e.HeaderByNumber(blockCtx, big.NewInt(int64(blockNum)))
1393
blockCancel()
1394
if err != nil {
0 commit comments