Vladimir Fomene
c56728ff13
refactor: Remove scan
and scan_txout
from SpkTxoutIndex and KeychainTxoutIndex
2023-09-03 01:51:21 +08:00
Daniela Brozzoni
cc1a43c495
fix: SpkIterator::new_with_range takes wildcards..
...
..into account
When you pass a non-wildcard descriptor in `new_with_range`, we make
sure that the range length is at most 1; if that's not the case, we
shorten it.
We would previously use `new_with_range` without this check and with a
non-wildcard descriptor in `spks_of_all_keychains`, this meant creating
a spkiterator that would go on producing the same spks over and over
again, causing some issues with syncing on electrum/esplora.
To reproduce the bug, run in `example-crates/example_electrum`:
```
cargo run "sh(wsh(or_d(c:pk_k(cPGudvRLDSgeV4hH9NUofLvYxYBSRjju3cpiXmBg9K8G9k1ikCMp),c:pk_k(cSBSBHRrzqSXFmrBhLkZMzQB9q4P9MnAq92v8d9a5UveBc9sLX32))))#zp9pcfs9" scan
```
2023-08-31 16:48:20 +02:00
Daniela Brozzoni
80f5ecf3be
feat(chain): Add initial_changeset
to graphs
...
Add `initial_changeset` to TxGraph and IndexedTxGraph
2023-08-18 11:52:31 +02:00
Daniela Brozzoni
ea50b6a932
refactor!(chain): Unify ChangeSet nomenclature
...
This commit renames:
- indexed_tx_graph::IndexedAdditions -> indexed_tx_graph::ChangeSet
- indexed_tx_graph::IndexedAdditions::graph_additions -> indexed_tx_graph::ChangeSet::graph
- indexed_tx_graph::IndexedAdditions::index_additions -> indexed_tx_graph::ChangeSet::indexer
- tx_graph::Additions -> tx_graph::ChangeSet
- keychain::DerivationAdditions -> keychain::ChangeSet
- CanonicalTx::node -> CanonicalTx::tx_node
- CanonicalTx::observed_as -> CanonicalTx::chain_position
- LocalChangeSet -> WalletChangeSet
- LocalChangeSet::chain_changeset -> WalletChangeSet::chain
- LocalChangeSet::indexed_additions -> WalletChangeSet::indexed_tx_graph
- LocalUpdate -> WalletUpdate
This commit also changes the visibility of TxGraph::determine_changeset
to be pub(crate), and the method accepts a TxGraph instead of &TxGraph
This commit removes:
- `TxGraph::insert_txout_preview`
- `TxGraph::insert_tx_preview`
- `insert_anchor_preview`
- `insert_seen_at_preview`
Solves #1022
2023-08-18 11:51:45 +02:00
Daniela Brozzoni
853d361751
Update bdk_chain to bitcoin 0.30.0
2023-08-03 10:58:59 +02:00
Vladimir Fomene
f5074ee3ae
remove duplicate is_empty
from DerivationAdditions
2023-07-14 17:52:08 +03:00
rajarshimaitra
b799a5728b
[bdk_chain_redesign] Add tests for IndexedTxGraph
with LocalChain
...
These tests cover list_txout, list_utxo and balance methods.
2023-04-28 19:18:50 +08:00
志宇
72b1e2a485
Simplify reveal_to_target
logic
...
- Remove unnecessary check
- Better comments
- Better variable names
- Add test for scanning txouts with lookahead
2023-03-18 09:18:09 +08:00
Steve Myers
38ef170ed1
Make bdk and bdk_chain work under 1.57.0
...
- rewrite some parts of the code to deal with older borrow checker
- downgraded hashbrown
2023-03-03 17:44:09 +01:00
Daniela Brozzoni
37dfa77d9d
Move bdk_chain into the bdk repo 🎉
...
Original repository: 250b4f1dcc/bdk_chain
Co-authored-by: Steve Myers <steve@notmandatory.org>
Co-authored-by: 志宇 <hello@evanlinjin.me>
Co-authored-by: LLFourn <lloyd.fourn@gmail.com>
Co-authored-by: rajarshimaitra <rajarshi149@gmail.com>
Co-authored-by: LagginTimes <wzc110@gmail.com>
Co-authored-by: Steve Myers <steve@notmandatory.org>
Co-authored-by: Vladimir Fomene <vladimirfomene@gmail.com>
2023-03-02 10:56:33 +01:00