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 committed Jul 29, 2024
1 parent 00cac12 commit 5f1a111
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 inTurnAddr
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 5f1a111

Please sign in to comment.