0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-10 10:52:31 -05:00

Prevent empty transactions from being added to vtxPrev

CWalletTx::AddSupportingTransactions() was adding empty transaction
to vtxPrev in some cases. Skip over these.

Part one of the solution to #3190. This prevents invalid vtxPrev from
entering the wallet, but not current ones being transmitted.
This commit is contained in:
Wladimir J. van der Laan 2013-12-04 15:30:23 +01:00
parent 00cfc9f074
commit d3ef9b00ec

View file

@ -765,6 +765,10 @@ void CWalletTx::AddSupportingTransactions()
{ {
tx = *mapWalletPrev[hash]; tx = *mapWalletPrev[hash];
} }
else
{
continue;
}
int nDepth = tx.SetMerkleBranch(); int nDepth = tx.SetMerkleBranch();
vtxPrev.push_back(tx); vtxPrev.push_back(tx);