Skip to content

Commit

Permalink
Merge pull request #3062 from sqrrm/fix-parsing
Browse files Browse the repository at this point in the history
Check that proposal is in correct cycle
  • Loading branch information
sqrrm authored Aug 7, 2019
2 parents 276a506 + 2632928 commit 21514da
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,9 @@ private Set<EvaluatedProposal> getEvaluatedProposals(Set<DecryptedBallotsWithMer
evaluatedProposals.forEach(evaluatedProposal -> evaluatedProposalsByTxIdMap.put(evaluatedProposal.getProposalTxId(), evaluatedProposal));

// Proposals which did not get any vote need to be set as failed.
// TODO We should not use proposalListPresentation here
proposalListPresentation.getActiveOrMyUnconfirmedProposals().stream()
.filter(proposal -> periodService.isTxInCorrectCycle(proposal.getTxId(), chainHeight))
.filter(proposal -> !evaluatedProposalsByTxIdMap.containsKey(proposal.getTxId()))
.forEach(proposal -> {
ProposalVoteResult proposalVoteResult = new ProposalVoteResult(proposal, 0,
Expand Down

0 comments on commit 21514da

Please sign in to comment.