diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-19 10:47:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-19 10:47:05 +0800 |
commit | e4825619fb2499f5f534537c1a4d52d3e0bcacfe (patch) | |
tree | 88d50a88293b477c238c62050da38f5b82908acb | |
parent | 09059cfe973b5566f6955396b827c6274966b2f2 (diff) | |
download | tangerine-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.go | 12 |
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 { |