aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/section.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-04-09 03:33:54 +0800
committerzelig <viktor.tron@gmail.com>2015-04-09 20:58:35 +0800
commite55747a074c7f280029b94c94418d60dff5d6773 (patch)
tree86057299276182a7703af41b39d366ef5b27caf4 /blockpool/section.go
parent262714fc6c269e0a3aa39892954b03db9418e649 (diff)
downloaddexon-e55747a074c7f280029b94c94418d60dff5d6773.tar
dexon-e55747a074c7f280029b94c94418d60dff5d6773.tar.gz
dexon-e55747a074c7f280029b94c94418d60dff5d6773.tar.bz2
dexon-e55747a074c7f280029b94c94418d60dff5d6773.tar.lz
dexon-e55747a074c7f280029b94c94418d60dff5d6773.tar.xz
dexon-e55747a074c7f280029b94c94418d60dff5d6773.tar.zst
dexon-e55747a074c7f280029b94c94418d60dff5d6773.zip
fix deadlock issue in AddBlock
- add peer switch channel arg to activateChain - no peer locking within - proper locking in AddBlock - fixes deadlock issue - comment out TD check and skip incorrect TD test again for hotfix
Diffstat (limited to 'blockpool/section.go')
-rw-r--r--blockpool/section.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/blockpool/section.go b/blockpool/section.go
index 49004d4ef..1ab543dc0 100644
--- a/blockpool/section.go
+++ b/blockpool/section.go
@@ -489,7 +489,7 @@ func (self *section) blockHashesRequest() {
// activate parent section with this peer
// but only if not during switch mode
plog.DebugDetailf("[%s] parent section [%s] activated\n", sectionhex(self), sectionhex(parentSection))
- self.bp.activateChain(parentSection, self.peer, nil)
+ self.bp.activateChain(parentSection, self.peer, self.peer.switchC, nil)
// if not root of chain, switch off
plog.DebugDetailf("[%s] parent found, hash requests deactivated (after %v total attempts)\n", sectionhex(self), self.blockHashesRequests)
self.blockHashesRequestTimer = nil