Skip to content

Commit 0ec6327

Browse files
authored
cmd/utils: use maximum uint64 value for receipt chain insertion (#32934)
1 parent 342285b commit 0ec6327

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/utils/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"errors"
2626
"fmt"
2727
"io"
28+
"math"
2829
"math/big"
2930
"os"
3031
"os/signal"
@@ -311,7 +312,7 @@ func ImportHistory(chain *core.BlockChain, dir string, network string) error {
311312
return fmt.Errorf("error reading receipts %d: %w", it.Number(), err)
312313
}
313314
encReceipts := types.EncodeBlockReceiptLists([]types.Receipts{receipts})
314-
if _, err := chain.InsertReceiptChain([]*types.Block{block}, encReceipts, 2^64-1); err != nil {
315+
if _, err := chain.InsertReceiptChain([]*types.Block{block}, encReceipts, math.MaxUint64); err != nil {
315316
return fmt.Errorf("error inserting body %d: %w", it.Number(), err)
316317
}
317318
imported += 1

0 commit comments

Comments
 (0)