diff --git a/internal/p2p/peermanager.go b/internal/p2p/peermanager.go index 09690cb31..abfa35e9d 100644 --- a/internal/p2p/peermanager.go +++ b/internal/p2p/peermanager.go @@ -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}