forked from bitcoinj/bitcoinj
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallet: clone transaction before committing
Problem: A transaction received from the network is added to all wallets that find it relevant. If two wallets find the same transaction relevant the same Transaction instance is added to both wallets. Spending the outputs from this transaction can cause consistiency issues, in particular if the outputs are spent in the same transaction, as shown in WalletTest.oneTxTwoWallets. There are probably more issues with having the same Transaction instance handled by two different wallets. Fix: Clone the transaction before adding it to the wallet.
- Loading branch information
Showing
2 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters