dec limit

This commit is contained in:
tycho garen
2022-06-16 18:23:20 -04:00
parent ca7a01d7fd
commit a3f7daf65f
+8
View File
@@ -1012,6 +1012,14 @@ func (m *PeerManager) Advertise(peerID types.NodeID, limit uint16) []NodeAddress
}
} else {
seenAddresses[addressInfo.Address] = struct{}{}
// if the number of addresses
// is the same as the limit,
// we should remove private
// addresses from the limit so
// we can still return early.
if numAddresses == int(limit) {
limit--
}
}
}
}