make const

(cherry picked from commit e3068b50b2)
This commit is contained in:
tycho garen
2022-06-10 15:54:42 -04:00
parent 3674859836
commit 7ed1236dea
+2 -1
View File
@@ -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.
@@ -434,7 +435,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}