]> Untitled Git - bdk/commit
feat(esplora)!: remove `EsploraExt::update_local_chain`
author志宇 <hello@evanlinjin.me>
Mon, 25 Mar 2024 05:39:21 +0000 (13:39 +0800)
committer志宇 <hello@evanlinjin.me>
Tue, 16 Apr 2024 10:01:47 +0000 (18:01 +0800)
commitbd62aa0fe199d676710c9909617198d62f4897c0
tree34a369c6dd7c8d22f6ef69c8c5a078a2a29469e8
parent1e997939837e9c1f0c087d6d28ac12e373c8c05f
feat(esplora)!: remove `EsploraExt::update_local_chain`

Previously, we would update the `TxGraph` and `KeychainTxOutIndex`
first, then create a second update for `LocalChain`. This required
locking the receiving structures 3 times (instead of twice, which
is optimal).

This PR eliminates this requirement by making use of the new `query`
method of `CheckPoint`.

Examples are also updated to use the new API.
crates/esplora/src/async_ext.rs
crates/esplora/src/blocking_ext.rs
crates/esplora/src/lib.rs
crates/esplora/tests/async_ext.rs
crates/esplora/tests/blocking_ext.rs
crates/testenv/src/lib.rs
example-crates/example_esplora/src/main.rs
example-crates/wallet_esplora_async/src/main.rs
example-crates/wallet_esplora_blocking/src/main.rs