aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/blockpool_test.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-04-08 01:53:05 +0800
committerzelig <viktor.tron@gmail.com>2015-04-09 20:58:35 +0800
commit42fb9652f56321d2752ffe7773806df11f3087b8 (patch)
treea78446ca225ec280e5e2dea83d4a80cfea7239f3 /blockpool/blockpool_test.go
parent30830652ae9ca15d1d9e1d32a22f9af671ae8a5a (diff)
downloaddexon-42fb9652f56321d2752ffe7773806df11f3087b8.tar.gz
dexon-42fb9652f56321d2752ffe7773806df11f3087b8.tar.zst
dexon-42fb9652f56321d2752ffe7773806df11f3087b8.zip
fix blockpool deadlock
- do not break from headsection on error [remove peer after protocol quit will close switchC, until then head block can arrive and block on channel while keeping peers lock causing a deadlock.] - more careful locking in AddBlock
Diffstat (limited to 'blockpool/blockpool_test.go')
-rw-r--r--blockpool/blockpool_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/blockpool/blockpool_test.go b/blockpool/blockpool_test.go
index 9bcd72f04..b28c2abbf 100644
--- a/blockpool/blockpool_test.go
+++ b/blockpool/blockpool_test.go
@@ -7,6 +7,10 @@ import (
"github.com/ethereum/go-ethereum/blockpool/test"
)
+func init() {
+ test.LogInit()
+}
+
// using the mock framework in blockpool_util_test
// we test various scenarios here