refactor: improve docs, cleanup unnecessary types and improve code

This commit is contained in:
Vladimir Fomene
2023-09-06 09:47:45 +03:00
parent 4104206980
commit d43ae0231f
11 changed files with 175 additions and 169 deletions

View File

@@ -7,7 +7,7 @@ use std::{io::Write, str::FromStr};
use bdk::{
bitcoin::{Address, Network},
wallet::{AddressIndex, WalletUpdate},
wallet::{AddressIndex, Update},
SignOptions, Wallet,
};
use bdk_esplora::{esplora_client, EsploraExt};
@@ -57,7 +57,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
client.update_tx_graph(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,
chain: Some(chain_update),