mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 22:23:11 +00:00
make const
This commit is contained in:
@@ -44,6 +44,7 @@ type PeerScore int
|
||||
const (
|
||||
PeerScorePersistent PeerScore = math.MaxInt16 // persistent peers
|
||||
MaxPeerScoreNotPersistent PeerScore = PeerScorePersistent - 1
|
||||
DefaultMutablePeerScore int64 = 256
|
||||
)
|
||||
|
||||
// PeerUpdate is a peer update event sent via PeerUpdates.
|
||||
@@ -411,7 +412,7 @@ func (m *PeerManager) Add(address NodeAddress) (bool, error) {
|
||||
|
||||
// set the peer's mutable score to something non-zero so that
|
||||
// peer's we've never
|
||||
peer.MutableScore = 256
|
||||
peer.MutableScore = DefaultMutablePeerScore
|
||||
|
||||
// else add the new address
|
||||
peer.AddressInfo[address] = &peerAddressInfo{Address: address}
|
||||
|
||||
Reference in New Issue
Block a user