diff --git a/api/src/foreign.rs b/api/src/foreign.rs index b42a3e1..7a97238 100644 --- a/api/src/foreign.rs +++ b/api/src/foreign.rs @@ -121,7 +121,7 @@ where /// use impls::{DefaultWalletImpl, DefaultLCProvider, HTTPNodeClient}; /// use libwallet::WalletInst; /// - /// global::init_global_chain_type(global::ChainTypes::Mainnet); + /// global::set_local_chain_type(global::ChainTypes::AutomatedTesting); /// /// let mut wallet_config = WalletConfig::default(); /// # let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); @@ -427,7 +427,8 @@ macro_rules! doctest_helper_setup_doc_env_foreign { use impls::{DefaultLCProvider, DefaultWalletImpl, HTTPNodeClient}; use libwallet::{BlockFees, IssueInvoiceTxArgs, Slate, WalletInst}; - global::init_global_chain_type(global::ChainTypes::Mainnet); + // Set our local chain_type for testing. + global::set_local_chain_type(global::ChainTypes::AutomatedTesting); let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); let dir = dir diff --git a/api/src/owner.rs b/api/src/owner.rs index 1123e22..5ed758b 100644 --- a/api/src/owner.rs +++ b/api/src/owner.rs @@ -127,7 +127,7 @@ where /// use impls::{DefaultWalletImpl, DefaultLCProvider, HTTPNodeClient}; /// use libwallet::WalletInst; /// - /// global::init_global_chain_type(global::ChainTypes::Mainnet); + /// global::set_local_chain_type(global::ChainTypes::AutomatedTesting); /// /// let mut wallet_config = WalletConfig::default(); /// # let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); @@ -2132,9 +2132,8 @@ macro_rules! doctest_helper_setup_doc_env { use uuid::Uuid; - // Various levels of magic going on in these doctests and we need to ensure - // the global chain_type is set correctly. - global::init_global_chain_type(global::ChainTypes::Mainnet); + // Set our local chain_type for testing. + global::set_local_chain_type(global::ChainTypes::AutomatedTesting); let dir = tempdir().map_err(|e| format!("{:#?}", e)).unwrap(); let dir = dir