What's preventing multiple votes from the same 1000 DASH?

BolehVPN

Active Member
Nov 24, 2014
195
306
123
I was wondering when someone takes their masternode offline, what happens to the votes they have already cast?

Also, what's preventing someone from using the same 1000 DASH, creating a masternode, then after voting, terminating it and creating a new masternode from the same Dash?

It may be tedious but just imagine if this was scripted, then people could multiply their voting power. For someone with a substantial number of masternodes, this can be quite pivotal if the vote is worth more to them than missing a MN payment.
 

UdjinM6

Official Dash Dev
Dash Core Team
Moderator
May 20, 2014
3,638
3,538
1,183
yep, vote from inactive masternode is thrown away
Code:
// If masternode voted for a proposal, but is now invalid -- remove the vote
void CBudgetProposal::CleanAndRemove(bool fSignatureCheck)
{
    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();

    while(it != mapVotes.end()) {
        (*it).second.fValid = (*it).second.SignatureValid(fSignatureCheck);
        ++it;
    }
}
https://github.com/dashpay/dash/blob/master/src/masternode-budget.cpp#L1390-L1399

PS. technically it's still there but invalid, fValid is used later in GetYeas and GetNays functions to filter only valid ones