From 6ed9128259023d440ea3297da85e0a0dba12e941 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Mon, 5 Nov 2018 18:37:46 +0800 Subject: vendor: sync to latest core --- .../dexon-foundation/dexon-consensus/core/consensus.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vendor/github.com') diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go index 2eed101c7..56c757b0d 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go @@ -159,6 +159,15 @@ func (recv *consensusBAReceiver) ConfirmBlock( recv.consensus.logger.Error("Failed to process block", "error", err) return } + // Clean the restartNotary channel so BA will not stuck by deadlock. +CleanChannelLoop: + for { + select { + case <-recv.restartNotary: + default: + break CleanChannelLoop + } + } if block.Timestamp.After(recv.changeNotaryTime) { recv.round++ recv.restartNotary <- true -- cgit v1.2.3