aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go
index ff1c71a7c..4fb0deaa8 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go
@@ -311,12 +311,13 @@ func (a *agreement) processVote(vote *types.Vote) error {
return err
}
aID := a.agreementID()
+ // Agreement module has stopped.
+ if isStop(aID) {
+ return nil
+ }
if vote.Position != aID {
- // Agreement module has stopped.
- if !isStop(aID) {
- if aID.Newer(&vote.Position) {
- return nil
- }
+ if aID.Newer(&vote.Position) {
+ return nil
}
a.pendingVote = append(a.pendingVote, pendingVote{
vote: vote,