-
Notifications
You must be signed in to change notification settings - Fork 322
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
proof of concept: implement cancel_tx
#1764
base: master
Are you sure you want to change the base?
proof of concept: implement cancel_tx
#1764
Conversation
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.
Thanks for looking into this.
I'm not very familiar with the BDK-codebase but I am happy to see where this is going
Canceled, | ||
/// new details added. note, when applied this will overwrite existing | ||
Details(Details), | ||
} |
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 don't really understand the design of this enum.
What is the difference between Record::Canceled
and Record::Details { canceled: true}
.
Why are both structs required?
@@ -44,6 +44,95 @@ const P2WPKH_FAKE_WITNESS_SIZE: usize = 106; | |||
|
|||
const DB_MAGIC: &[u8] = &[0x21, 0x24, 0x48]; | |||
|
|||
#[test] | |||
fn cancel_tx_frees_spent_inputs() -> anyhow::Result<()> { |
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.
Nice, this test behaves exactly as I would expect
@ValuedMammal could you further elaborate on the goals of this PR? Thanks! |
cancel_tx
+ tx detailscancel_tx
Even after PR #1765, I think |
Description
This is not a merge candidate. The goal of this PR is implement
cancel_tx
, as doing so has the potential to fix a long-standing TODO in the library saying "make this free up reserved utxos when that's implemented". This was initiated in response to user feedback claiming that the method has no effect.issue #1743
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committing