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

Function NewPeerPool

consensus/vbft/peer_pool.go:55–65  ·  view source on GitHub ↗
(maxSize int, server *Server)

Source from the content-addressed store, hash-verified

53}
54
55func NewPeerPool(maxSize int, server *Server) *PeerPool {
56 return &PeerPool{
57 maxSize: maxSize,
58 server: server,
59 configs: make(map[uint32]*vconfig.PeerConfig),
60 IDMap: make(map[string]uint32),
61 P2pMap: make(map[uint32]uint64),
62 peers: make(map[uint32]*Peer),
63 peerConnectionWaitings: make(map[uint32]chan struct{}),
64 }
65}
66
67func (pool *PeerPool) clean() {
68 pool.lock.Lock()

Callers 1

initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected