Skip to content

Commit

Permalink
Fixed lookup for correct vin in GetMasterNodeVin when txHash is avail…
Browse files Browse the repository at this point in the history
…able.
  • Loading branch information
freynder committed Dec 16, 2014
1 parent 3a7f3f8 commit b57bfe0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,12 @@ bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secr
if(!strTxHash.empty()) {
// Let's find it
uint256 txHash(strTxHash);
int outputIndex = boost::lexical_cast<int>(outputIndex);
int outputIndex = 0;
outputIndex = boost::lexical_cast<int>(outputIndex);
bool found = false;
BOOST_FOREACH(COutput& out, possibleCoins) {
if(true) {
if(out.tx->GetHash() == txHash && out.i == outputIndex)
{
selectedOutput = &out;
found = true;
break;
Expand Down

0 comments on commit b57bfe0

Please sign in to comment.