]> Untitled Git - bdk/commitdiff
[wallet] Add wallet.network()
authorLLFourn <lloyd.fourn@gmail.com>
Tue, 1 Dec 2020 02:29:20 +0000 (13:29 +1100)
committerLLFourn <lloyd.fourn@gmail.com>
Tue, 1 Dec 2020 02:29:20 +0000 (13:29 +1100)
src/wallet/mod.rs

index f817d6411ed4b8e775d08a8a71abd62411a81d46..8a88cd432cf28e38e90a8e3f902d5cb62e03538c 100644 (file)
@@ -1351,6 +1351,11 @@ where
         self.client.as_ref()
     }
 
+    /// Get the Bitcoin network the wallet is using.
+    pub fn network(&self) -> Network {
+        self.network
+    }
+
     /// Broadcast a transaction to the network
     #[maybe_async]
     pub fn broadcast(&self, tx: Transaction) -> Result<Txid, Error> {