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

Method GetFailedTimes

p2pserver/block_sync.go:188–196  ·  view source on GitHub ↗

GetFailedTimes return failed times of a node

(nodeId uint64)

Source from the content-addressed store, hash-verified

186
187//GetFailedTimes return failed times of a node
188func (this *SyncFlightInfo) GetFailedTimes(nodeId uint64) int {
189 this.lock.RLock()
190 defer this.lock.RUnlock()
191 times, ok := this.failedNodes[nodeId]
192 if !ok {
193 return 0
194 }
195 return times
196}
197
198//GetTotalFailedTimes return the total failed times of request
199func (this *SyncFlightInfo) GetTotalFailedTimes() int {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected