MCPcopy Create free account
hub / github.com/DNAProject/DNA / GetPeer

Method GetPeer

p2pserver/net/netserver/netserver.go:180–182  ·  view source on GitHub ↗

GetPeer returns a peer with the peer id

(id uint64)

Source from the content-addressed store, hash-verified

178
179// GetPeer returns a peer with the peer id
180func (this *NetServer) GetPeer(id uint64) *peer.Peer {
181 return this.Np.GetPeer(id)
182}
183
184//return nbr peers collection
185func (this *NetServer) GetNp() *peer.NbrPeers {

Callers 1

TestNetServerNbrPeerFunction · 0.95

Calls 1

GetPeerMethod · 0.65

Tested by 1

TestNetServerNbrPeerFunction · 0.76