diff --git a/crates/bdk/src/wallet/mod.rs b/crates/bdk/src/wallet/mod.rs index 1ca78a775..d9ba3f1ee 100644 --- a/crates/bdk/src/wallet/mod.rs +++ b/crates/bdk/src/wallet/mod.rs @@ -247,7 +247,7 @@ impl Wallet { let changeset = db.load_from_persistence().map_err(NewError::Persist)?; chain.apply_changeset(&changeset.chain); - indexed_graph.apply_changeset(changeset.index_tx_graph); + indexed_graph.apply_changeset(changeset.indexed_tx_graph); let persist = Persist::new(db); diff --git a/crates/chain/src/keychain.rs b/crates/chain/src/keychain.rs index 64d68d81e..3a6cddf80 100644 --- a/crates/chain/src/keychain.rs +++ b/crates/chain/src/keychain.rs @@ -133,14 +133,14 @@ pub struct WalletChangeSet { /// ChangeSet to [`IndexedTxGraph`]. /// /// [`IndexedTxGraph`]: crate::indexed_tx_graph::IndexedTxGraph - pub index_tx_graph: indexed_tx_graph::ChangeSet>, + pub indexed_tx_graph: indexed_tx_graph::ChangeSet>, } impl Default for WalletChangeSet { fn default() -> Self { Self { chain: Default::default(), - index_tx_graph: Default::default(), + indexed_tx_graph: Default::default(), } } } @@ -148,11 +148,11 @@ impl Default for WalletChangeSet { impl Append for WalletChangeSet { fn append(&mut self, other: Self) { Append::append(&mut self.chain, other.chain); - Append::append(&mut self.index_tx_graph, other.index_tx_graph); + Append::append(&mut self.indexed_tx_graph, other.indexed_tx_graph); } fn is_empty(&self) -> bool { - self.chain.is_empty() && self.index_tx_graph.is_empty() + self.chain.is_empty() && self.indexed_tx_graph.is_empty() } } @@ -166,9 +166,9 @@ impl From for WalletChangeSet { } impl From>> for WalletChangeSet { - fn from(index_tx_graph: indexed_tx_graph::ChangeSet>) -> Self { + fn from(indexed_tx_graph: indexed_tx_graph::ChangeSet>) -> Self { Self { - index_tx_graph, + indexed_tx_graph, ..Default::default() } } diff --git a/example-crates/example_electrum/src/main.rs b/example-crates/example_electrum/src/main.rs index 2a5c1310c..4c5fde6a3 100644 --- a/example-crates/example_electrum/src/main.rs +++ b/example-crates/example_electrum/src/main.rs @@ -68,7 +68,7 @@ fn main() -> anyhow::Result<()> { let graph = Mutex::new({ let mut graph = IndexedTxGraph::new(index); - graph.apply_changeset(init_changeset.index_tx_graph); + graph.apply_changeset(init_changeset.indexed_tx_graph); graph }); @@ -277,7 +277,7 @@ fn main() -> anyhow::Result<()> { let chain = chain.apply_update(final_update.chain)?; - let index_tx_graph = { + let indexed_tx_graph = { let mut changeset = indexed_tx_graph::ChangeSet::::default(); let (_, indexer) = graph @@ -292,7 +292,7 @@ fn main() -> anyhow::Result<()> { }; ChangeSet { - index_tx_graph, + indexed_tx_graph, chain, } }; diff --git a/example-crates/example_esplora/src/main.rs b/example-crates/example_esplora/src/main.rs index fc17feb44..e1a053a92 100644 --- a/example-crates/example_esplora/src/main.rs +++ b/example-crates/example_esplora/src/main.rs @@ -70,7 +70,7 @@ fn main() -> anyhow::Result<()> { // aren't strictly needed here. let graph = Mutex::new({ let mut graph = IndexedTxGraph::new(index); - graph.apply_changeset(init_changeset.index_tx_graph); + graph.apply_changeset(init_changeset.indexed_tx_graph); graph }); let chain = Mutex::new({ @@ -309,7 +309,7 @@ fn main() -> anyhow::Result<()> { let (missing_block_heights, tip) = { let chain = &*chain.lock().unwrap(); let heights_to_fetch = changeset - .index_tx_graph + .indexed_tx_graph .graph .anchors .iter()