mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Chg: Changed the maximum automatic rewind length from 256 to 126
This commit is contained in:
parent
241af1fa1e
commit
5c8625c999
1 changed files with 4 additions and 2 deletions
|
|
@ -37,6 +37,8 @@ var (
|
|||
rewindLengthMeter = metrics.NewRegisteredMeter("chain/autorewind/length", nil)
|
||||
)
|
||||
|
||||
const maxRewindLen uint64 = 126
|
||||
|
||||
type borVerifier struct {
|
||||
verify func(ctx context.Context, eth *Ethereum, handler *ethHandler, start uint64, end uint64, hash string, isCheckpoint bool) (string, error)
|
||||
}
|
||||
|
|
@ -117,8 +119,8 @@ func borVerify(ctx context.Context, eth *Ethereum, handler *ethHandler, start ui
|
|||
}
|
||||
}
|
||||
|
||||
if head-rewindTo > 255 {
|
||||
rewindTo = head - 255
|
||||
if head-rewindTo > maxRewindLen {
|
||||
rewindTo = head - maxRewindLen
|
||||
}
|
||||
|
||||
if isCheckpoint {
|
||||
|
|
|
|||
Loading…
Reference in a new issue