(blockHash common.Uint256, nodeId uint64)
| 813 | } |
| 814 | |
| 815 | func (this *BlockSyncMgr) getFlightBlock(blockHash common.Uint256, nodeId uint64) *SyncFlightInfo { |
| 816 | this.lock.RLock() |
| 817 | defer this.lock.RUnlock() |
| 818 | infos, ok := this.flightBlocks[blockHash] |
| 819 | if !ok { |
| 820 | return nil |
| 821 | } |
| 822 | for _, info := range infos { |
| 823 | if info.GetNodeId() == nodeId { |
| 824 | return info |
| 825 | } |
| 826 | } |
| 827 | return nil |
| 828 | } |
| 829 | |
| 830 | func (this *BlockSyncMgr) delFlightBlock(blockHash common.Uint256) bool { |
| 831 | this.lock.Lock() |
no test coverage detected