mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
revert to invalidTipetsCap
This commit is contained in:
parent
507f88a513
commit
055237e020
1 changed files with 3 additions and 3 deletions
|
|
@ -58,9 +58,9 @@ const (
|
||||||
// to be reprocessed again.
|
// to be reprocessed again.
|
||||||
invalidBlockHitEviction = 128
|
invalidBlockHitEviction = 128
|
||||||
|
|
||||||
// invalidTipetsCap is the max number of recent block hashes tracked that
|
// invalidTipsetsCap is the max number of recent block hashes tracked that
|
||||||
// have lead to some bad ancestor block. It's just an OOM protection.
|
// have lead to some bad ancestor block. It's just an OOM protection.
|
||||||
invalidTipetsCap = 512
|
invalidTipsetsCap = 512
|
||||||
|
|
||||||
// beaconUpdateStartupTimeout is the time to wait for a beacon client to get
|
// beaconUpdateStartupTimeout is the time to wait for a beacon client to get
|
||||||
// attached before starting to issue warnings.
|
// attached before starting to issue warnings.
|
||||||
|
|
@ -715,7 +715,7 @@ func (api *ConsensusAPI) checkInvalidAncestor(check common.Hash, head common.Has
|
||||||
// Not too many failures yet, mark the head of the invalid chain as invalid
|
// Not too many failures yet, mark the head of the invalid chain as invalid
|
||||||
if check != head {
|
if check != head {
|
||||||
log.Warn("Marked new chain head as invalid", "hash", head, "badnumber", invalid.Number, "badhash", badHash)
|
log.Warn("Marked new chain head as invalid", "hash", head, "badnumber", invalid.Number, "badhash", badHash)
|
||||||
for len(api.invalidTipsets) >= invalidTipetsCap {
|
for len(api.invalidTipsets) >= invalidTipsetsCap {
|
||||||
for key := range api.invalidTipsets {
|
for key := range api.invalidTipsets {
|
||||||
delete(api.invalidTipsets, key)
|
delete(api.invalidTipsets, key)
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue