additional chekc in VoteMsg

This commit is contained in:
gamarin 2018-06-07 12:30:49 +02:00
parent b525989319
commit 09ea8dac11
1 changed files with 4 additions and 2 deletions

View File

@ -184,9 +184,11 @@ handled:
throw
if (proposal.CurrentStatus == ProposalStatusActive)
if (proposal.CurrentStatus == ProposalStatusActive && len(stakeKeeper.GetDelegations(sender)) > 0)
// Sender can vote
// Sender can vote if
// Proposal is active
// Sender has some bonds
store(Governance, <txGovVote.ProposalID|'addresses'|sender>, txGovVote.Vote) // Voters can vote multiple times. Re-voting overrides previous vote. This is ok because tallying is done once at the end.