-
Notifications
You must be signed in to change notification settings - Fork 331
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
Enhance bdk chain structures #1084
Enhance bdk chain structures #1084
Conversation
What's the motivation for removing |
This was my suggestion and I wrote it on the ticket. I don't think it is needed? The pub trait Indexer {
/* ... */
fn index_txouts<'a>(
&mut self,
txouts: impl IntoIterator<Item = (OutPoint, &'a TxOut)>,
) -> Self::ChangeSet
where
Self::ChangeSet: Append + Default,
{
let mut changeset = Self::ChangeSet::default();
for (outpoint, txout) in txouts {
Append::append(&mut changeset, self.index_txout(outpoint, txout));
}
changeset
}
} Now anything that implements |
2f3b9d9
to
d640543
Compare
Will rebase this once MSRV fixes make it to master. |
d640543
to
ebe28bd
Compare
5ca099f
to
7d7ec20
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.
Thanks for the work so far. Sorry about my incremental reviews.
So if I want to index a |
@LLFourn I'm thinking you will use |
Understood. I think might be as easy as we need to make it. Thanks. |
0c2ddec
to
2d482fd
Compare
74f213e
to
2377826
Compare
We remove `ElectrumUpdate` and return tuples instead for `ElectrumExt` methods. We introduce the `IncompleteTxGraph` structure to specifically hodl the incomplete `TxGraph`. This change is motivated by @LLFourn's comment: bitcoindevkit@794bf37#r1305432603
905101d
to
c56728f
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.
ACK c56728f
I confirmed example_electrum
and example_esplora
scan and sync commands still work. Used my test signet descriptors:
cargo run -- --network signet "wpkh(tprv8ZgxMBicQKsPdy6LMhUtFHAgpocR8GC6QmwMSFpZs7h6Eziw3SpThFfczTDh5rW2krkqffa11UpX3XkeTTB2FvzZKWXqPY54Y6Rq4AQ5R8L/84'/1'/0'/0/*)" "wpkh(tprv8ZgxMBicQKsPdy6LMhUtFHAgpocR8GC6QmwMSFpZs7h6Eziw3SpThFfczTDh5rW2krkqffa11UpX3XkeTTB2FvzZKWXqPY54Y6Rq4AQ5R8L/84'/1'/0'/1/*)" scan
One small nit, it looks like most of the commits include breaking changes so commit messages should include a |
ACK c56728f |
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.
Hey @vladimirfomene thanks for doing this refactoring.
I've pointed out a bunch of ways we can simplify things in both wallet types and electrum_ext. Many of the changes requested are not to do with this PR but I think this is the place to do them.
[edit] I also pushed 4104206
e89c839
to
9669b36
Compare
f8d3070
to
ee01b0f
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.
This LGTM! ACK ee01b0f
left a couple of small comments.
1b1eb8f
to
1530568
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.
Mostly nits and documentation suggestions.
0ad05a6
to
69d6825
Compare
69d6825
to
d43ae02
Compare
And signature of `example_cli::KeychainChangeSet` is changed.
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.
ACK 1ff806c
Description
Fixes #1061
Changelog notice
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committing