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

Method newPeer

protocols/cpc/handler.go:244–246  ·  view source on GitHub ↗
(pv int, p *p2p.Peer, rw p2p.MsgReadWriter)

Source from the content-addressed store, hash-verified

242}
243
244func (pm *ProtocolManager) newPeer(pv int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {
245 return newPeer(pv, p, newMeteredMsgWriter(rw))
246}
247
248// addPeer is the callback invoked to manage the life cycle of cpchain peer.
249// when this function terminates, the peer is disconnected.

Callers 2

handlePeerMethod · 0.95
newTestPeerFunction · 0.80

Calls 2

newPeerFunction · 0.85
newMeteredMsgWriterFunction · 0.85

Tested by 1

newTestPeerFunction · 0.64