From ec62fa8dbb046874e0025a28032d5c1272eb4990 Mon Sep 17 00:00:00 2001 From: blxdyx Date: Mon, 29 Jul 2024 16:29:26 +0800 Subject: [PATCH] consensus/parlia: exclude inturn validator when calculate backoffTime --- consensus/parlia/util.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/consensus/parlia/util.go b/consensus/parlia/util.go index 0d859443db2..d6199ac2863 100644 --- a/consensus/parlia/util.go +++ b/consensus/parlia/util.go @@ -35,12 +35,17 @@ func backOffTime(snap *Snapshot, header *types.Header, val libcommon.Address, ch delay = 0 } - // Exclude the recently signed validators + // Exclude the recently signed validators and the in turn validator temp := make([]libcommon.Address, 0, len(validators)) for _, addr := range validators { if snap.signRecentlyByCounts(addr, counts) { continue } + if chainConfig.IsBohr(header.Number.Uint64(), header.Time) { + if addr == inTurnAddr { + continue + } + } temp = append(temp, addr) } validators = temp