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

Method addFlightBlock

p2pserver/block_sync.go:799–803  ·  view source on GitHub ↗
(nodeId uint64, height uint32, blockHash common.Uint256)

Source from the content-addressed store, hash-verified

797}
798
799func (this *BlockSyncMgr) addFlightBlock(nodeId uint64, height uint32, blockHash common.Uint256) {
800 this.lock.Lock()
801 defer this.lock.Unlock()
802 this.flightBlocks[blockHash] = append(this.flightBlocks[blockHash], NewSyncFlightInfo(height, nodeId))
803}
804
805func (this *BlockSyncMgr) getFlightBlocks(blockHash common.Uint256) []*SyncFlightInfo {
806 this.lock.RLock()

Callers 2

syncBlockMethod · 0.95
saveBlockMethod · 0.95

Calls 1

NewSyncFlightInfoFunction · 0.85

Tested by

no test coverage detected