diff --git a/triedb/pathdb/history_trienode.go b/triedb/pathdb/history_trienode.go index 1004106af9..3c0e087040 100644 --- a/triedb/pathdb/history_trienode.go +++ b/triedb/pathdb/history_trienode.go @@ -404,7 +404,7 @@ func decodeSingle(keySection []byte, onValue func([]byte, int, int) error) ([]st keyOff += nn // Validate that the values can fit in an int to prevent overflow on 32-bit systems - if nShared > uint64(math.MaxUint32) || nUnshared > uint64(math.MaxUint32) || nValue > uint64(math.MaxUint32) { + if nShared > uint64(math.MaxInt) || nUnshared > uint64(math.MaxInt) || nValue > uint64(math.MaxInt) { return nil, errors.New("key size too large") }