Skip to content

Commit

Permalink
Merge #612: bitcoind: Make BitcoinD public and add stop method
Browse files Browse the repository at this point in the history
3372a8d bitcoind: add `stop` method (jp1ac4)
60ee667 bitcoind: make `BitcoinD` public (jp1ac4)

Pull request description:

  This is needed as part of #592 for both checking connectivity to the internal `bitcoind` and stopping it when closing Liana.

ACKs for top commit:
  darosior:
    utACK 3372a8d

Tree-SHA512: 804cf6a94688db7aa8d78b10a47d08f58ff93c322c9f91bee7b98625d7d5e0633282fa4d0a1b801e56a334a4448f0348930fe5ef3265b5719bd090b6128fc67a
  • Loading branch information
darosior committed Aug 16, 2023
2 parents 0591243 + 3372a8d commit 1a964f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/bitcoin/d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,11 @@ impl BitcoinD {
}
}
}

/// Stop bitcoind.
pub fn stop(&self) {
self.make_node_request("stop", &[]);
}
}

/// An entry in the 'listdescriptors' result.
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ mod testutils;
pub use bip39;
pub use miniscript;

pub use crate::bitcoin::d::{BitcoindError, WalletError};
pub use crate::bitcoin::d::{BitcoinD, BitcoindError, WalletError};
#[cfg(feature = "daemon")]
use crate::jsonrpc::server::{rpcserver_loop, rpcserver_setup};
use crate::{
bitcoin::{d::BitcoinD, poller, BitcoinInterface},
bitcoin::{poller, BitcoinInterface},
config::Config,
database::{
sqlite::{FreshDbOptions, SqliteDb, SqliteDbError},
Expand Down

0 comments on commit 1a964f3

Please sign in to comment.