()
| 839 | } |
| 840 | |
| 841 | func (this *BlockSyncMgr) getFlightBlockCount() int { |
| 842 | this.lock.RLock() |
| 843 | defer this.lock.RUnlock() |
| 844 | cnt := 0 |
| 845 | for hash := range this.flightBlocks { |
| 846 | cnt += len(this.flightBlocks[hash]) |
| 847 | } |
| 848 | return cnt |
| 849 | } |
| 850 | |
| 851 | func (this *BlockSyncMgr) isBlockOnFlight(blockHash common.Uint256) bool { |
| 852 | flightInfos := this.getFlightBlocks(blockHash) |