]> Untitled Git - bdk/commitdiff
fix: s/index_tx_graph/indexed_tx_graph/g
authorLLFourn <lloyd.fourn@gmail.com>
Fri, 25 Aug 2023 06:18:29 +0000 (14:18 +0800)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Thu, 31 Aug 2023 11:07:19 +0000 (13:07 +0200)
crates/bdk/src/wallet/mod.rs
crates/chain/src/keychain.rs
example-crates/example_electrum/src/main.rs
example-crates/example_esplora/src/main.rs

index 7a72ce4ab41c91e31895f7a1a5a86469c1fa2b26..f7bc5f49b9a12d196233f42f59636453a9ab7f19 100644 (file)
@@ -248,7 +248,7 @@ impl<D> Wallet<D> {
 
         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);
 
index 64d68d81e99975a4806780fd99cece3a10e6a115..3a6cddf80ff92b16344efd5a5412e9cce1795867 100644 (file)
@@ -133,14 +133,14 @@ pub struct WalletChangeSet<K, A> {
     /// ChangeSet to [`IndexedTxGraph`].
     ///
     /// [`IndexedTxGraph`]: crate::indexed_tx_graph::IndexedTxGraph
-    pub index_tx_graph: indexed_tx_graph::ChangeSet<A, ChangeSet<K>>,
+    pub indexed_tx_graph: indexed_tx_graph::ChangeSet<A, ChangeSet<K>>,
 }
 
 impl<K, A> Default for WalletChangeSet<K, A> {
     fn default() -> Self {
         Self {
             chain: Default::default(),
-            index_tx_graph: Default::default(),
+            indexed_tx_graph: Default::default(),
         }
     }
 }
@@ -148,11 +148,11 @@ impl<K, A> Default for WalletChangeSet<K, A> {
 impl<K: Ord, A: Anchor> Append for WalletChangeSet<K, A> {
     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<K, A> From<local_chain::ChangeSet> for WalletChangeSet<K, A> {
 }
 
 impl<K, A> From<indexed_tx_graph::ChangeSet<A, ChangeSet<K>>> for WalletChangeSet<K, A> {
-    fn from(index_tx_graph: indexed_tx_graph::ChangeSet<A, ChangeSet<K>>) -> Self {
+    fn from(indexed_tx_graph: indexed_tx_graph::ChangeSet<A, ChangeSet<K>>) -> Self {
         Self {
-            index_tx_graph,
+            indexed_tx_graph,
             ..Default::default()
         }
     }
index 2a5c1310c089464f7ac5eabd6567b0a4bcda2b1d..4c5fde6a3330958c2b83951c408eb4ac389c91f2 100644 (file)
@@ -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::<ConfirmationHeightAnchor, _>::default();
             let (_, indexer) = graph
@@ -292,7 +292,7 @@ fn main() -> anyhow::Result<()> {
         };
 
         ChangeSet {
-            index_tx_graph,
+            indexed_tx_graph,
             chain,
         }
     };
index 56ea42d5cf12bedce55926106a9193091899fb63..f33125be8e6fc402fe839d6dc91645a70d1a0b22 100644 (file)
@@ -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({