Skip to content

Commit

Permalink
Test bitcoind wallet behavior during mempool eviction (#2817)
Browse files Browse the repository at this point in the history
* Test bitcoind wallet behavior during mempool eviction

When transactions are being evicted from the mempool, we want to make
sure that bitcoind keeps the corresponding wallet inputs locked to
avoid accidentally double-spending ourselves. We update our unit test
to be closer to common scenarios (chain of unconfirmed splice txs and
commit txs replaced by the remote version).

This test confirms that bitcoind keeps wallet inputs locked, and we
have to call `abandontransaction` to free up utxos used in txs that
have been permanently double-spent.

* Test bitcoind wallet behavior during double spend

When one of our wallet transactions is directly double-spent, the
bitcoin wallet detects that and automatically frees up wallet inputs
from the permanently double-spent wallet transaction. This is great,
that means we only need to manually call `abandontransaction` for
transactions that have been invalidated because one of their parents
has been double-spent.
  • Loading branch information
t-bast authored Feb 13, 2024
1 parent b5e83a6 commit 599f9af
Showing 1 changed file with 343 additions and 67 deletions.
Loading

0 comments on commit 599f9af

Please sign in to comment.