-
Notifications
You must be signed in to change notification settings - Fork 384
Introduce canonicalization modifiers. #1808
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
base: master
Are you sure you want to change the base?
Introduce canonicalization modifiers. #1808
Conversation
4169060
to
0f00cdb
Compare
Would it make sense to add This way the existing And if you could only add new Then you could also add the For
|
ConceptACK. Would be nice to have draft PR built on this that resolves bitcoindevkit/bdk_wallet#40 so we know that this is all that's needed at the chain level before merging this. |
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.
cACK 0f00cdb
Took this out of the |
@notmandatory I do not think so. Different calls to |
We want ordering for these txids. In case of conflict between them, we need a way to prioritize ones over others. This order should be controlled by the caller. |
c70b40b
to
b780142
Compare
f73f26e
to
c8f2ddf
Compare
c8f2ddf
to
37fa16d
Compare
Introduce `CanonicalizationMods` which is passed in to `CanonicalIter::new`. `CanonicalizationMods::assume_canonical` is the only field right now. This contains a list of txids that we assume to be canonical, superceding any other canonicalization rules.
37fa16d
to
d309780
Compare
Partially Fixes bitcoindevkit/bdk_wallet#40
Description
Add the ability to modify the canonicalization algorithm. Right now, the only modifier is
assume_canonical
which takes in aVec
(ordered list) of txids and superimposes it on the canonicalization algorithm. Txs later in the list (higher index) have a higher priority (in case of conflicts).This is a "partial fix" because I haven't figured out how to expose this on the
bdk_wallet
level yet (some thoughts on this will be very appreciated).Notes to the reviewers
None at the moment.
Changelog notice
CanonicalizationMods
to allow the caller to modify the canonicalization algorithm. This in a new parameter onCanonicalIter::new
.Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: