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
evanlinjin
left a comment
There was a problem hiding this comment.
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
notmandatory
left a comment
There was a problem hiding this comment.
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.
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
1b1eb8f to
1530568
Compare
evanlinjin
left a comment
There was a problem hiding this comment.
Mostly nits and documentation suggestions.
0ad05a6 to
69d6825
Compare
69d6825 to
d43ae02
Compare
And signature of `example_cli::KeychainChangeSet` is changed.
Description
Fixes #1061
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committing