aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-11-05 18:37:46 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:49:56 +0800
commit3bb027dec94d7c12a0088f586ddf15e42122b768 (patch)
tree4845e29d0504105c46b54996d83f2d3d24dcd823 /vendor/github.com
parentfc79d21c39aa9263dccd999b6f815a6709274956 (diff)
downloaddexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar.gz
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar.bz2
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar.lz
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar.xz
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.tar.zst
dexon-3bb027dec94d7c12a0088f586ddf15e42122b768.zip
vendor: sync to latest core
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go9
1 files changed, 9 insertions, 0 deletions
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