Skip to content

Commit d3ef9b0

Browse files
committed
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.
1 parent 00cfc9f commit d3ef9b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wallet.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,10 @@ void CWalletTx::AddSupportingTransactions()
765765
{
766766
tx = *mapWalletPrev[hash];
767767
}
768+
else
769+
{
770+
continue;
771+
}
768772

769773
int nDepth = tx.SetMerkleBranch();
770774
vtxPrev.push_back(tx);

0 commit comments

Comments
 (0)