From 055237e0200997d3f61855a7834ef6c8b1a0fca6 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 26 Feb 2024 15:21:26 +0800 Subject: [PATCH] revert to invalidTipetsCap --- eth/catalyst/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 75e89abddf..4f9902a931 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -58,9 +58,9 @@ const ( // to be reprocessed again. 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. - invalidTipetsCap = 512 + invalidTipsetsCap = 512 // beaconUpdateStartupTimeout is the time to wait for a beacon client to get // 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 if check != head { 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 { delete(api.invalidTipsets, key) break