-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test bitcoind wallet behavior during mempool eviction #2817
Conversation
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.
01acbbc
to
57f3242
Compare
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2817 +/- ##
==========================================
+ Coverage 85.86% 85.90% +0.04%
==========================================
Files 216 217 +1
Lines 18228 18296 +68
Branches 772 793 +21
==========================================
+ Hits 15652 15718 +66
- Misses 2576 2578 +2
|
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.
6b5a770
to
ae0c312
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't imagine how much fun you had writing these tests!
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 tests to be closer to common scenarios (chain of unconfirmed splice txs, commit txs replaced by the remote version, anchor tx RBF and htlc txs conflicts).
These tests confirm that:
abandontransaction
ourselves to free up utxos