remove vin,vins

This commit is contained in:
blackjok3r
2018-11-11 14:23:46 +08:00
parent b5c356dddf
commit 677d4f9b50

View File

@@ -1074,12 +1074,18 @@ UniValue cleanwalletnotarisations(const UniValue& params, bool fHelp)
} }
if ( spents == mine ) if ( spents == mine )
{ {
TxToRemove.push_back(wtx.GetHash());
for (unsigned int n = 0; n < wtx.vin.size() ; n++) for (unsigned int n = 0; n < wtx.vin.size() ; n++)
{ {
if ( pwalletMain->IsMine(wtx.vin[n]) ) //if ( pwalletMain->IsMine(wtx.vin[n]) )
TxToRemove.push_back(wtx.vin[n].prevout.hash); CTransaction vintx; uint256 hashBlock;
if ( GetTransaction(wtx.vin[n].prevout.hash,vintx,hashBlock,false) != 0 )
{
for (unsigned int z = 0; z < vintx.vin.size() ; z++)
TxToRemove.push_back(vintx.vin[z].prevout.hash);
}
TxToRemove.push_back(wtx.vin[n].prevout.hash);
} }
TxToRemove.push_back(wtx.GetHash());
} }
} }