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

Method getAllNodeWeights

p2pserver/block_sync.go:928–936  ·  view source on GitHub ↗

getAllNodeWeights get all nodeweight and return a slice

()

Source from the content-addressed store, hash-verified

926
927//getAllNodeWeights get all nodeweight and return a slice
928func (this *BlockSyncMgr) getAllNodeWeights() NodeWeights {
929 this.lock.RLock()
930 defer this.lock.RUnlock()
931 weights := make(NodeWeights, 0, len(this.nodeWeights))
932 for _, w := range this.nodeWeights {
933 weights = append(weights, w)
934 }
935 return weights
936}
937
938//addTimeoutCnt incre a node's timeout count
939func (this *BlockSyncMgr) addTimeoutCnt(nodeId uint64) {

Callers 1

getNextNodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected