]> Untitled Git - bdk-cli/commitdiff
Minor cleanup
authorSteve Myers <steve@notmandatory.org>
Fri, 1 Apr 2022 16:14:28 +0000 (09:14 -0700)
committerSteve Myers <steve@notmandatory.org>
Fri, 1 Apr 2022 16:14:28 +0000 (09:14 -0700)
src/bdk_cli.rs
src/lib.rs

index 9844d6282337d25fc7ef8dcf8f91e46e751db583..93b9fd9208ef1ae994070f1ab76ff7775b508701 100644 (file)
@@ -71,7 +71,7 @@ const REPL_LINE_SPLIT_REGEX: &str = r#""([^"]*)"|'([^']*)'|([\w\-]+)"#;
 #[structopt(name = "", setting = AppSettings::NoBinaryName,
 version = option_env ! ("CARGO_PKG_VERSION").unwrap_or("unknown"),
 author = option_env ! ("CARGO_PKG_AUTHORS").unwrap_or(""))]
-pub enum ReplSubCommand {
+enum ReplSubCommand {
     #[cfg(any(
         feature = "electrum",
         feature = "esplora",
@@ -127,7 +127,7 @@ fn open_database(wallet_opts: &WalletOpts) -> Result<Tree, Error> {
     feature = "compact_filters",
     feature = "rpc"
 ))]
-pub fn new_blockchain(_network: Network, wallet_opts: &WalletOpts) -> Result<AnyBlockchain, Error> {
+fn new_blockchain(_network: Network, wallet_opts: &WalletOpts) -> Result<AnyBlockchain, Error> {
     #[cfg(feature = "electrum")]
     let config = AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig {
         url: wallet_opts.electrum_opts.server.clone(),
@@ -208,7 +208,7 @@ pub fn new_blockchain(_network: Network, wallet_opts: &WalletOpts) -> Result<Any
     Ok(AnyBlockchain::from_config(&config)?)
 }
 
-pub fn new_wallet<D>(
+fn new_wallet<D>(
     network: Network,
     wallet_opts: &WalletOpts,
     database: D,
index d5d37c9e32c5aef0c71aab838b7fe3a43b497784..8b106311f317ed400e2416c12a44bece7a9cc73b 100644 (file)
@@ -1428,14 +1428,12 @@ mod test {
     use bdk::miniscript::bitcoin::network::constants::Network::Testnet;
     #[cfg(all(feature = "reserves", feature = "electrum"))]
     use bdk::{
-        blockchain::ElectrumBlockchain, database::MemoryDatabase, electrum_client::Client, Wallet,
+        blockchain::ElectrumBlockchain, database::MemoryDatabase, electrum_client::Client,
+        SyncOptions, Wallet,
     };
     use std::str::{self, FromStr};
     use structopt::StructOpt;
 
-    #[cfg(all(feature = "reserves", feature = "electrum",))]
-    use crate::bdk::SyncOptions;
-
     #[test]
     fn test_parse_wallet_get_new_address() {
         let cli_args = vec!["bdk-cli", "--network", "bitcoin", "wallet",