OnAddNode to node list when a new node added
(nodeId uint64)
| 617 | |
| 618 | //OnAddNode to node list when a new node added |
| 619 | func (this *BlockSyncMgr) OnAddNode(nodeId uint64) { |
| 620 | log.Debugf("[p2p]OnAddNode:%d", nodeId) |
| 621 | this.lock.Lock() |
| 622 | defer this.lock.Unlock() |
| 623 | w := NewNodeWeight(nodeId) |
| 624 | this.nodeWeights[nodeId] = w |
| 625 | } |
| 626 | |
| 627 | //OnDelNode remove from node list. When the node disconnect |
| 628 | func (this *BlockSyncMgr) OnDelNode(nodeId uint64) { |
nothing calls this directly
no test coverage detected