(pv int, p *p2p.Peer, rw p2p.MsgReadWriter)
| 242 | } |
| 243 | |
| 244 | func (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. |