peer_heap.go
func (ph *peerHeap) addPeer(peerScore *peerScore) {
	ph.pushPeer(peerScore)

	// Pick a random element, and swap the order with that peerScore.
	r := ph.rng.Intn(ph.Len())
	ph.swapOrder(peerScore.index, r)
}
func (ph *peerHeap) addPeer(peerScore *peerScore) {
	ph.pushPeer(peerScore)

	// Pick a random element, and swap the order with that peerScore.
	r := ph.rng.Intn(ph.Len())
	ph.swapOrder(peerScore.index, r)
}
// AddPeer adds a peer to the peer heap.