Fixed start-many issue with multiple output tx

masternode.conf was broken when any index other than 0 was
used. This fixes it and allows the correct input to be selected
and the masternode to be started successfully.
This commit is contained in:
Evan Duffield 2015-01-08 09:05:59 -07:00
parent 6df70d30b1
commit 3c553cc4a7

View File

@ -302,8 +302,7 @@ bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secr
if(!strTxHash.empty()) {
// Let's find it
uint256 txHash(strTxHash);
int outputIndex = 0;
outputIndex = boost::lexical_cast<int>(outputIndex);
int outputIndex = boost::lexical_cast<int>(strOutputIndex);
bool found = false;
BOOST_FOREACH(COutput& out, possibleCoins) {
if(out.tx->GetHash() == txHash && out.i == outputIndex)