aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-02-19 10:47:05 +0800
committerGitHub <noreply@github.com>2019-02-19 10:47:05 +0800
commite4825619fb2499f5f534537c1a4d52d3e0bcacfe (patch)
tree88d50a88293b477c238c62050da38f5b82908acb
parent09059cfe973b5566f6955396b827c6274966b2f2 (diff)
downloadtangerine-consensus-e4825619fb2499f5f534537c1a4d52d3e0bcacfe.tar.gz
tangerine-consensus-e4825619fb2499f5f534537c1a4d52d3e0bcacfe.tar.zst
tangerine-consensus-e4825619fb2499f5f534537c1a4d52d3e0bcacfe.zip
core: change pull vote position (#449)
-rw-r--r--core/agreement-mgr.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/agreement-mgr.go b/core/agreement-mgr.go
index bcf1013..c3692d8 100644
--- a/core/agreement-mgr.go
+++ b/core/agreement-mgr.go
@@ -582,18 +582,18 @@ Loop:
}
default:
}
- if agr.pullVotes() {
- pos := agr.agreementID()
- mgr.logger.Debug("Calling Network.PullVotes for syncing votes",
- "position", &pos)
- mgr.network.PullVotes(pos)
- }
if err = agr.nextState(); err != nil {
mgr.logger.Error("Failed to proceed to next state",
"nodeID", mgr.ID.String(),
"error", err)
break Loop
}
+ if agr.pullVotes() {
+ pos := agr.agreementID()
+ mgr.logger.Debug("Calling Network.PullVotes for syncing votes",
+ "position", &pos)
+ mgr.network.PullVotes(pos)
+ }
for i := 0; i < agr.clocks(); i++ {
// Priority select for agreement.done().
select {