Skip to content

Commit

Permalink
set_local_chain_type in owner and foreign tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antiochp committed May 23, 2020
1 parent 0a19d5c commit 2561589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions api/src/foreign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions api/src/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2561589

Please sign in to comment.