From 4d2cd087071d4892afae383dae98dcbdb8431e9b Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Wed, 3 Oct 2018 14:04:01 +0800 Subject: core: Add unit test for DKG CRS in consensus (#163) --- core/consensus.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/consensus.go') diff --git a/core/consensus.go b/core/consensus.go index 6cc0937..51c4e35 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -428,6 +428,11 @@ func (con *Consensus) runCRS() { } con.cfgModule.registerDKG(con.round+1, con.currentConfig.NumDKGSet/3) <-ticker.Tick() + select { + case <-con.ctx.Done(): + return + default: + } // Change round. con.round++ con.currentConfig = con.gov.Configuration(con.round) -- cgit v1.2.3