code: func peerExists(connMgr rpcserverConnManager, addr string, nodeID int32) bool {
  	for _, p := range connMgr.ConnectedPeers() {
  		if p.ToPeer().ID() == nodeID || p.ToPeer().Addr() == addr {
  			return true
  		}
  	}
  	return false
  }
docs: // peerExists determines if a certain peer is currently connected given
  // information about all currently connected peers. Peer existence is
  // determined using either a target address or node id.