FIXME: should rename to isPeerConnected
(peerIdx uint32)
| 76 | |
| 77 | // FIXME: should rename to isPeerConnected |
| 78 | func (pool *PeerPool) isNewPeer(peerIdx uint32) bool { |
| 79 | pool.lock.RLock() |
| 80 | defer pool.lock.RUnlock() |
| 81 | |
| 82 | if _, present := pool.peers[peerIdx]; present { |
| 83 | return !pool.peers[peerIdx].connected |
| 84 | } |
| 85 | |
| 86 | return true |
| 87 | } |
| 88 | |
| 89 | func (pool *PeerPool) addPeer(config *vconfig.PeerConfig) error { |
| 90 | pool.lock.Lock() |
no outgoing calls