@@ -465,7 +465,7 @@ impl Node {
465
465
/// Starts the necessary background tasks, such as handling events coming from user input,
466
466
/// LDK/BDK, and the peer-to-peer network. After this returns, the [`Node`] instance can be
467
467
/// controlled via the provided API methods in a thread-safe manner.
468
- pub fn start ( & mut self ) -> Result < ( ) , Error > {
468
+ pub fn start ( & self ) -> Result < ( ) , Error > {
469
469
// Acquire a run lock and hold it until we're setup.
470
470
let mut run_lock = self . running . write ( ) . unwrap ( ) ;
471
471
if run_lock. is_some ( ) {
@@ -479,7 +479,7 @@ impl Node {
479
479
}
480
480
481
481
/// Disconnects all peers, stops all running background tasks, and shuts down [`Node`].
482
- pub fn stop ( & mut self ) -> Result < ( ) , Error > {
482
+ pub fn stop ( & self ) -> Result < ( ) , Error > {
483
483
let mut run_lock = self . running . write ( ) . unwrap ( ) ;
484
484
if run_lock. is_none ( ) {
485
485
return Err ( Error :: NotRunning ) ;
@@ -697,14 +697,14 @@ impl Node {
697
697
}
698
698
699
699
/// Retrieve a new on-chain/funding address.
700
- pub fn new_funding_address ( & mut self ) -> Result < bitcoin:: Address , Error > {
700
+ pub fn new_funding_address ( & self ) -> Result < bitcoin:: Address , Error > {
701
701
let funding_address = self . wallet . get_new_address ( ) ?;
702
702
log_info ! ( self . logger, "Generated new funding address: {}" , funding_address) ;
703
703
Ok ( funding_address)
704
704
}
705
705
706
706
/// Retrieve the current on-chain balance.
707
- pub fn on_chain_balance ( & mut self ) -> Result < bdk:: Balance , Error > {
707
+ pub fn on_chain_balance ( & self ) -> Result < bdk:: Balance , Error > {
708
708
self . wallet . get_balance ( )
709
709
}
710
710
0 commit comments