addNewSpeed apend the new speed to tail, remove the oldest one
(nodeId uint64, speed float32)
| 961 | |
| 962 | //addNewSpeed apend the new speed to tail, remove the oldest one |
| 963 | func (this *BlockSyncMgr) addNewSpeed(nodeId uint64, speed float32) { |
| 964 | n := this.getNodeWeight(nodeId) |
| 965 | if n != nil { |
| 966 | n.AppendNewSpeed(speed) |
| 967 | } |
| 968 | } |
| 969 | |
| 970 | //pingOutsyncNodes send ping msg to lower height nodes for syncing |
| 971 | func (this *BlockSyncMgr) pingOutsyncNodes(curHeight uint32) { |
no test coverage detected