From 04ed5db62c8434745a6cabfc8aad856ba914b737 Mon Sep 17 00:00:00 2001 From: Tim Flynn Date: Sun, 29 Jan 2017 14:09:21 -0500 Subject: [PATCH] Fix Vote iteration bug (#1290) * Fix Vote iteration bug * Fix order of statements --- src/instantx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/instantx.cpp b/src/instantx.cpp index 247088cd8..4b166457d 100644 --- a/src/instantx.cpp +++ b/src/instantx.cpp @@ -173,12 +173,14 @@ void CInstantSend::Vote(CTxLockCandidate& txLockCandidate) if(n == -1) { LogPrint("instantsend", "CInstantSend::Vote -- Unknown Masternode %s\n", activeMasternode.vin.prevout.ToStringShort()); + ++itOutpointLock; continue; } int nSignaturesTotal = COutPointLock::SIGNATURES_TOTAL; if(n > nSignaturesTotal) { LogPrint("instantsend", "CInstantSend::Vote -- Masternode not in the top %d (%d)\n", nSignaturesTotal, n); + ++itOutpointLock; continue; } @@ -202,7 +204,10 @@ void CInstantSend::Vote(CTxLockCandidate& txLockCandidate) } } } - if(fAlreadyVoted) continue; // skip to the next outpoint + if(fAlreadyVoted) { + ++itOutpointLock; + continue; // skip to the next outpoint + } // we haven't voted for this outpoint yet, let's try to do this now CTxLockVote vote(txHash, itOutpointLock->first, activeMasternode.vin.prevout);