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

Method fetchedBlock

consensus/vbft/node_sync.go:499–512  ·  view source on GitHub ↗
(blkNum uint32, block *Block)

Source from the content-addressed store, hash-verified

497}
498
499func (self *PeerSyncer) fetchedBlock(blkNum uint32, block *Block) error {
500 self.lock.Lock()
501 defer self.lock.Unlock()
502
503 if blkNum == self.nextReqBlkNum {
504 self.server.syncer.blockFromPeerC <- &BlockMsgFromPeer{
505 fromPeer: self.peerIdx,
506 block: block,
507 }
508 self.nextReqBlkNum++
509 }
510
511 return nil
512}

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected