Explicitly convert mutable txes to immutable before calling AcceptableInputs

This commit is contained in:
UdjinM6 2015-04-07 05:56:10 +03:00
parent 955865481e
commit 41f592aec7
3 changed files with 4 additions and 4 deletions

View File

@ -396,7 +396,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
return;
}
if(!AcceptableInputs(mempool, state, tx, false, NULL)) {
if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) {
LogPrintf("dsi -- transaction not valid! \n");
error = _("Transaction not valid.");
pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
@ -1377,7 +1377,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
if(!AcceptableInputs(mempool, state, tx, false, NULL)){
if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
return;
}

View File

@ -265,7 +265,7 @@ void CMasternode::Check()
tx.vin.push_back(vin);
tx.vout.push_back(vout);
if(!AcceptableInputs(mempool, state, tx, false, NULL)){
if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
activeState = MASTERNODE_VIN_SPENT;
return;
}

View File

@ -668,7 +668,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
tx.vin.push_back(vin);
tx.vout.push_back(vout);
if(AcceptableInputs(mempool, state, tx, false, NULL)){
if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
if(fDebug) LogPrintf("dsee - Accepted Masternode entry %i %i\n", count, current);
if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){