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
NathanBSC authored Jul 31, 2024
1 parent 7d90701 commit 987b8c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion consensus/parlia/parlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 987b8c1

Please sign in to comment.