aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-04-04 22:16:31 +0800
committerGitHub <noreply@github.com>2019-04-04 22:16:31 +0800
commitd433231363d622acb26f8fa9b072470c179dbc62 (patch)
tree8e25e95b4af834489c1062521d090b31d2ca997f
parent0475adf7692697df91d359d67f7298574adfe327 (diff)
downloadtangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar.gz
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar.bz2
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar.lz
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar.xz
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.tar.zst
tangerine-consensus-d433231363d622acb26f8fa9b072470c179dbc62.zip
core: do nothing if not in notary set (#549)
-rw-r--r--core/agreement-mgr.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/agreement-mgr.go b/core/agreement-mgr.go
index 582a72e..4e6f230 100644
--- a/core/agreement-mgr.go
+++ b/core/agreement-mgr.go
@@ -578,6 +578,14 @@ Loop:
}
default:
}
+ if !mgr.recv.isNotary {
+ select {
+ case <-setting.ticker.Tick():
+ continue Loop
+ case <-mgr.ctx.Done():
+ break Loop
+ }
+ }
if err = agr.nextState(); err != nil {
mgr.logger.Error("Failed to proceed to next state",
"nodeID", mgr.ID.String(),