]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#1084: Enhance bdk chain structures
author志宇 <hello@evanlinjin.me>
Fri, 15 Sep 2023 01:24:05 +0000 (09:24 +0800)
committer志宇 <hello@evanlinjin.me>
Fri, 15 Sep 2023 01:24:53 +0000 (09:24 +0800)
1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5 fix(chain)!: rm weird `From` impl (志宇)
d43ae0231fa4670b98780cad84466c14ae087292 refactor: improve docs, cleanup unnecessary types and improve code (Vladimir Fomene)
41042069809e3eeb4a8cc8a5a8db1af2c57c4a11 feat: impl Append for lots of tuples (LLFourn)
c56728ff1315e0deaf256af07fd1ff5e18fced8a refactor: Remove `scan` and `scan_txout` from SpkTxoutIndex and KeychainTxoutIndex (Vladimir Fomene)
32c40ac939bc514ac7f1d3f1d7cd1080011e20ba feat(electrum)!: change signature of `ElectrumExt` (志宇)
a28748c33976312b9e6671636ab7e305323efb03 refactor: Implement Default for WalletUpdate (Vladimir Fomene)
f42f8b8ff19c2e67888b476487e4e5c9edb0d0ff refactor: Allow for no chain update (Vladimir Fomene)
68572bfd2e32efdeefaa46618e8e248d3a87f143 refactor: move WalletChangeset to wallet module (Vladimir Fomene)
2392e50fd9793902d480556caa4ec225085c82d6 refactor: Move WalletUpdate to wallet module (Vladimir Fomene)
7c12dc994242bf2d7e35c2723f6e7000de97a388 refactor: Remove ForEachTxout trait (Vladimir Fomene)
6bcbb93233824ec391689191b8ca1f5459cec930 refactor: Edit ElectrumExt not to use WalletUpdate (Vladimir Fomene)

Pull request description:

  ### Description

  Fixes #1061

  ### Changelog notice

  - Move WalletUpdate to the wallet module
  - Remove ForEachTxout trait completely
  - Refactor ElectrumExt to not use WalletUpdate.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  evanlinjin:
    ACK 1ff806c67f4da9ba58b7c7689fde0fe41a34a6f5

Tree-SHA512: 05349713af9d2efa14a522ceaabb7513bb437d786adf2f93055765589a67e4eb68bda36ff415aeba07816c4d30988d4d55bac018e7697019270a219105ed65a2

1  2 
example-crates/example_esplora/src/main.rs
example-crates/wallet_esplora_async/src/main.rs
example-crates/wallet_esplora_blocking/src/main.rs

index 4001858de3f6a5acaa1bd7cb3e3bfc083117cd39,8034dabfc621a0bc10e7e725de630afcf0e16d1b..a93a449c82e2bef34dcdc1880f7702ca27dc0d97
@@@ -55,13 -54,13 +54,13 @@@ fn main() -> Result<(), Box<dyn std::er
          .collect();
  
      let (update_graph, last_active_indices) =
 -        client.update_tx_graph(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)?;
 +        client.scan_txs_with_keychains(keychain_spks, None, None, STOP_GAP, PARALLEL_REQUESTS)?;
      let missing_heights = wallet.tx_graph().missing_heights(wallet.local_chain());
      let chain_update = client.update_local_chain(prev_tip, missing_heights)?;
-     let update = WalletUpdate {
+     let update = Update {
          last_active_indices,
          graph: update_graph,
-         ..WalletUpdate::new(chain_update)
+         chain: Some(chain_update),
      };
  
      wallet.apply_update(update)?;