From b861d45b14a0dce609a3dc826008d39cbc580801 Mon Sep 17 00:00:00 2001 From: Guillem Rieu Date: Fri, 14 Apr 2017 19:00:36 +0200 Subject: [PATCH] Proto/Alpha: fix proposal checking location in `Amendment.record_ballot` --- src/proto/alpha/amendment.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proto/alpha/amendment.ml b/src/proto/alpha/amendment.ml index f44cc7e06..79c4b8dd3 100644 --- a/src/proto/alpha/amendment.ml +++ b/src/proto/alpha/amendment.ml @@ -121,11 +121,11 @@ let record_proposals ctxt delegate proposals = fail Unexpected_proposal let record_ballot ctxt delegate proposal ballot = - Vote.get_current_proposal ctxt >>=? fun current_proposal -> - fail_unless (Protocol_hash.equal proposal current_proposal) - Invalid_proposal >>=? fun () -> Vote.get_current_period_kind ctxt >>=? function | Testing_vote | Promotion_vote -> + Vote.get_current_proposal ctxt >>=? fun current_proposal -> + fail_unless (Protocol_hash.equal proposal current_proposal) + Invalid_proposal >>=? fun () -> Vote.in_listings ctxt delegate >>= fun in_listings -> if in_listings then Vote.record_ballot ctxt delegate ballot