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

Method appendReqTime

p2pserver/block_sync.go:955–960  ·  view source on GitHub ↗

appendReqTime append a node's request time

(nodeId uint64)

Source from the content-addressed store, hash-verified

953
954//appendReqTime append a node's request time
955func (this *BlockSyncMgr) appendReqTime(nodeId uint64) {
956 n := this.getNodeWeight(nodeId)
957 if n != nil {
958 n.AppendNewReqtime()
959 }
960}
961
962//addNewSpeed apend the new speed to tail, remove the oldest one
963func (this *BlockSyncMgr) addNewSpeed(nodeId uint64, speed float32) {

Callers 4

checkTimeoutMethod · 0.95
syncHeaderMethod · 0.95
syncBlockMethod · 0.95
saveBlockMethod · 0.95

Calls 2

getNodeWeightMethod · 0.95
AppendNewReqtimeMethod · 0.80

Tested by

no test coverage detected