From 0f2dd4260fd98b2be06b7f9b0197134c89f11d3c Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Fri, 22 Mar 2019 20:20:52 +0800 Subject: 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 --- core/syncer/consensus.go | 1 + 1 file changed, 1 insertion(+) (limited to 'core/syncer') diff --git a/core/syncer/consensus.go b/core/syncer/consensus.go index 4fc24b4..f5099e4 100644 --- a/core/syncer/consensus.go +++ b/core/syncer/consensus.go @@ -176,6 +176,7 @@ func (con *Consensus) assureBuffering() { continue } con.nodeSetCache.Purge(e.Round + 1) + con.tsigVerifier.Purge(e.Round + 1) } }) // Register a round event handler to notify CRS to agreementModule. -- cgit v1.2.3