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

Function newSyncer

consensus/vbft/node_sync.go:86–98  ·  view source on GitHub ↗
(server *Server)

Source from the content-addressed store, hash-verified

84}
85
86func newSyncer(server *Server) *Syncer {
87 return &Syncer{
88 server: server,
89 maxRequestPerPeer: 4,
90 nextReqBlkNum: 1,
91 syncCheckReqC: make(chan *SyncCheckReq, 4),
92 blockSyncReqC: make(chan *BlockSyncReq, 16),
93 syncMsgC: make(chan *SyncMsg, 256),
94 blockFromPeerC: make(chan *BlockMsgFromPeer, 64),
95 peers: make(map[uint32]*PeerSyncer),
96 pendingBlocks: make(map[uint32]BlockFromPeers),
97 }
98}
99
100func (self *Syncer) stop() {
101 self.lock.Lock()

Callers 2

initializeMethod · 0.85

Calls

no outgoing calls

Tested by 1