Merge pull request #3062 from sqrrm/fix-parsing

Check that proposal is in correct cycle
This commit is contained in:
sqrrm 2019-08-07 21:19:10 +02:00 committed by GitHub
commit 21514da7e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -559,7 +559,9 @@ public class VoteResultService implements DaoStateListener, DaoSetupService {
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,