Skip to content

Commit

Permalink
Prevent empty transactions from being added to vtxPrev
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
laanwj authored and Gnos1s committed Oct 29, 2014
1 parent 5e17057 commit c93e385
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,10 @@ void CWalletTx::AddSupportingTransactions()
{
tx = *mapWalletPrev[hash];
}
else
{
continue;
}

int nDepth = tx.SetMerkleBranch();
vtxPrev.push_back(tx);
Expand Down

0 comments on commit c93e385

Please sign in to comment.