MCPcopy Create free account
hub / github.com/CPChain/chain / Peer

Method Peer

protocols/cpc/peer.go:481–486  ·  view source on GitHub ↗

Peer retrieves the registered peer with the given id.

(id string)

Source from the content-addressed store, hash-verified

479
480// Peer retrieves the registered peer with the given id.
481func (ps *peerSet) Peer(id string) *peer {
482 ps.lock.RLock()
483 defer ps.lock.RUnlock()
484
485 return ps.peers[id]
486}
487
488// Len returns if the current number of peers in the set.
489func (ps *peerSet) Len() int {

Callers 2

NewProtocolManagerFunction · 0.80
removePeerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected