()
| 643 | } |
| 644 | |
| 645 | func (this *BlockSyncMgr) tryGetSyncHeaderLock() bool { |
| 646 | this.lock.Lock() |
| 647 | defer this.lock.Unlock() |
| 648 | if this.syncHeaderLock { |
| 649 | return true |
| 650 | } |
| 651 | this.syncHeaderLock = true |
| 652 | return false |
| 653 | } |
| 654 | |
| 655 | func (this *BlockSyncMgr) releaseSyncHeaderLock() { |
| 656 | this.lock.Lock() |