Skip to content

Commit

Permalink
prevent duplicate remove vote (navcoin#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v authored Apr 8, 2021
1 parent 2fe797f commit a3ee5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ bool SignBlock(CBlock *pblock, CWallet& wallet, int64_t nFees, std::string sLog)
bool fProposal = view.HaveProposal(hash);
bool fPaymentRequest = view.HavePaymentRequest(hash);

if (mapAddedVotes.count(hash) == 0 && votes.count(hash) == 0 && (fProposal || fPaymentRequest) && !(pblock->nNonce & 1))
if (val != VoteFlags::VOTE_REMOVE && mapAddedVotes.count(hash) == 0 && votes.count(hash) == 0 && (fProposal || fPaymentRequest) && !(pblock->nNonce & 1))
{
pblock->vtx[0].vout.insert(pblock->vtx[0].vout.begin(), CTxOut());

Expand Down

0 comments on commit a3ee5db

Please sign in to comment.