mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
p2p: peer score should not wrap around (#8790)
This commit is contained in:
@@ -1538,6 +1538,10 @@ func (p *peerInfo) Score() PeerScore {
|
||||
score -= int64(addr.DialFailures)
|
||||
}
|
||||
|
||||
if score < math.MinInt16 {
|
||||
score = math.MinInt16
|
||||
}
|
||||
|
||||
return PeerScore(score)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user