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

Method getNodeWeight

p2pserver/block_sync.go:921–925  ·  view source on GitHub ↗

getNodeWeight get nodeweight by id

(nodeId uint64)

Source from the content-addressed store, hash-verified

919
920//getNodeWeight get nodeweight by id
921func (this *BlockSyncMgr) getNodeWeight(nodeId uint64) *NodeWeight {
922 this.lock.RLock()
923 defer this.lock.RUnlock()
924 return this.nodeWeights[nodeId]
925}
926
927//getAllNodeWeights get all nodeweight and return a slice
928func (this *BlockSyncMgr) getAllNodeWeights() NodeWeights {

Callers 6

OnHeaderReceiveMethod · 0.95
saveBlockMethod · 0.95
addTimeoutCntMethod · 0.95
addErrorRespCntMethod · 0.95
appendReqTimeMethod · 0.95
addNewSpeedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected