mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-20 22:33:38 +01:00
1f60ca360ewallet: fix removeprunedfunds bug with conflicting transactions (Martin Zumsande) Pull request description: `removeprunedfunds` removes all entries from `mapTxSpends` for the inputs of the pruned tx. However, this is incorrect, because there could be multiple entries from conflicting transactions (that shouldn't be removed as well). This could lead to the wallet creating invalid transactions, trying to double spend utxos. The bug persists when the conflicting tx was mined, because the wallet trusts its internal accounting instead of calling `AddToSpends` again. The added test should fail on master. ACKs for top commit: achow101: ACK1f60ca360efjahr: tACK1f60ca360efurszy: utACK1f60ca360evasild: ACK1f60ca360eTree-SHA512: 3cc9ed547530fd53e25721177b76ab2e1eae16ce2c0e63fc01b20fdbf8bd02655dae51167ad56f9dec748d34c61ce65d38f993370820601f8257c73b876a3347