Skip to content

Commit 8a58b1b

Browse files
committed
f Make balance and syncing available in non-testing
1 parent 8bcbd9e commit 8a58b1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ impl Node {
705705
Ok(funding_address)
706706
}
707707

708-
#[cfg(test)]
709708
/// Retrieve the current on-chain balance.
710709
pub fn on_chain_balance(&mut self) -> Result<bdk::Balance, Error> {
711710
self.wallet.get_balance()
@@ -787,7 +786,9 @@ impl Node {
787786
}
788787
}
789788

790-
#[cfg(test)]
789+
/// Sync the LDK and BDK wallets with the current chain state.
790+
///
791+
/// Note that the wallets will be also synced regularly in the background.
791792
pub fn sync_wallets(&self) -> Result<(), Error> {
792793
let runtime_lock = self.running.read().unwrap();
793794
if runtime_lock.is_none() {

src/wallet.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ where
164164
Ok(address_info.address)
165165
}
166166

167-
#[cfg(any(test))]
168167
pub(crate) fn get_balance(&self) -> Result<bdk::Balance, Error> {
169168
Ok(self.inner.lock().unwrap().get_balance()?)
170169
}

0 commit comments

Comments
 (0)