diff options
author | Mission Liao <mission.liao@dexon.org> | 2019-03-22 20:20:52 +0800 |
---|---|---|
committer | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-22 20:20:52 +0800 |
commit | 0f2dd4260fd98b2be06b7f9b0197134c89f11d3c (patch) | |
tree | 49203e7f865fc823c0a51d88da27c3ff05656357 /core/blockchain_test.go | |
parent | 99723721b79e7f1cf5d1009d9117705d84df5eaa (diff) | |
download | dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar.gz dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar.bz2 dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar.lz dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar.xz dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.tar.zst dexon-consensus-0f2dd4260fd98b2be06b7f9b0197134c89f11d3c.zip |
core: abort hang DKG (#508)
* Capitalize log
* Fix DKG aborting hangs
Make sure reset cc.dkg to nil in runDKG
* Remember to purge tsig verfier too
* Replace abortCh with context.Context
* Fix obvious bug
* Fixup: forever blockin at Wait method when runDKG is not called
* Fixup: fix corner case
If the Add(1) moved to runDKG under cc.dkgLock,
we may not catch it after unlocking cc.dkgLock.
* fixup
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r-- | core/blockchain_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 3fe7697..87b8eac 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -44,6 +44,8 @@ func (t *testTSigVerifierGetter) UpdateAndGet(round uint64) ( return &testTSigVerifier{}, true, nil } +func (t *testTSigVerifierGetter) Purge(_ uint64) {} + type BlockChainTestSuite struct { suite.Suite |