Skip to content

Commit

Permalink
consensus/parlia: exclude inturn validator when calculate backoffTime (
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx committed Jul 29, 2024
1 parent 0da1c9c commit f3bd21a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion consensus/parlia/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f3bd21a

Please sign in to comment.