aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-04 15:30:23 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-05 11:05:14 +0100
commit1eb11e32e82deec9a85b77b3969684739f4a5d4e (patch)
tree3522f4e59d0237edf87e3525d47d61f443e40839
parentec93d0aa4389b41d36f90678901322d9f135f743 (diff)
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.
-rw-r--r--src/wallet.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a519c7a17f..1c5fb528ba 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -740,6 +740,10 @@ void CWalletTx::AddSupportingTransactions()
{
tx = *mapWalletPrev[hash];
}
+ else
+ {
+ continue;
+ }
int nDepth = tx.SetMerkleBranch();
vtxPrev.push_back(tx);