consensus/parlia: exclude inturn validator when calculate backoffTime (#2618)
This commit is contained in:
parent
7d907016ff
commit
987b8c1504
@ -2029,12 +2029,17 @@ func (p *Parlia) backOffTime(snap *Snapshot, header *types.Header, val common.Ad
|
||||
delay = 0
|
||||
}
|
||||
|
||||
// Exclude the recently signed validators
|
||||
// Exclude the recently signed validators and the in turn validator
|
||||
temp := make([]common.Address, 0, len(validators))
|
||||
for _, addr := range validators {
|
||||
if snap.signRecentlyByCounts(addr, counts) {
|
||||
continue
|
||||
}
|
||||
if p.chainConfig.IsBohr(header.Number, header.Time) {
|
||||
if addr == inTurnAddr {
|
||||
continue
|
||||
}
|
||||
}
|
||||
temp = append(temp, addr)
|
||||
}
|
||||
validators = temp
|
||||
|
Loading…
Reference in New Issue
Block a user