Merge bitcoindevkit/bdk#1084: Enhance bdk chain structures
1ff806c67ffix(chain)!: rm weird `From` impl (志宇)d43ae0231frefactor: improve docs, cleanup unnecessary types and improve code (Vladimir Fomene)4104206980feat: impl Append for lots of tuples (LLFourn)c56728ff13refactor: Remove `scan` and `scan_txout` from SpkTxoutIndex and KeychainTxoutIndex (Vladimir Fomene)32c40ac939feat(electrum)!: change signature of `ElectrumExt` (志宇)a28748c339refactor: Implement Default for WalletUpdate (Vladimir Fomene)f42f8b8ff1refactor: Allow for no chain update (Vladimir Fomene)68572bfd2erefactor: move WalletChangeset to wallet module (Vladimir Fomene)2392e50fd9refactor: Move WalletUpdate to wallet module (Vladimir Fomene)7c12dc9942refactor: Remove ForEachTxout trait (Vladimir Fomene)6bcbb93233refactor: 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: ACK1ff806c67fTree-SHA512: 05349713af9d2efa14a522ceaabb7513bb437d786adf2f93055765589a67e4eb68bda36ff415aeba07816c4d30988d4d55bac018e7697019270a219105ed65a2
This commit is contained in:
@@ -7,8 +7,7 @@ use std::{io::Write, str::FromStr};
|
||||
|
||||
use bdk::{
|
||||
bitcoin::{Address, Network},
|
||||
chain::keychain::WalletUpdate,
|
||||
wallet::AddressIndex,
|
||||
wallet::{AddressIndex, Update},
|
||||
SignOptions, Wallet,
|
||||
};
|
||||
use bdk_esplora::{esplora_client, EsploraExt};
|
||||
@@ -58,10 +57,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
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)?;
|
||||
|
||||
Reference in New Issue
Block a user