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

Method Less

p2pserver/block_sync.go:139–143  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

137 nws[i], nws[j] = nws[j], nws[i]
138}
139func (nws NodeWeights) Less(i, j int) bool {
140 ni := nws[i]
141 nj := nws[j]
142 return ni.Weight() < nj.Weight() && ni.errorRespCnt >= nj.errorRespCnt && ni.timeoutCnt >= nj.timeoutCnt
143}
144
145//SyncFlightInfo record the info of fight object(header or block)
146type SyncFlightInfo struct {

Callers

nothing calls this directly

Calls 1

WeightMethod · 0.80

Tested by

no test coverage detected