(i, j int)
| 137 | nws[i], nws[j] = nws[j], nws[i] |
| 138 | } |
| 139 | func (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) |
| 146 | type SyncFlightInfo struct { |