From 422db826674d0ae1794d3df8d20d6801abf72ce1 Mon Sep 17 00:00:00 2001 From: Antioch Peverell Date: Thu, 31 Jan 2019 09:23:19 +0000 Subject: [PATCH] no is_mainnet() to keep tests close to mainnet (#2496) --- core/src/global.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/global.rs b/core/src/global.rs index 01334192..7cdfb586 100644 --- a/core/src/global.rs +++ b/core/src/global.rs @@ -267,17 +267,14 @@ pub fn is_production_mode() -> bool { } /// Are we in floonet? +/// Note: We do not have a corresponding is_mainnet() as we want any tests to be as close +/// as possible to "mainnet" configuration as possible. +/// We want to avoid missing any mainnet only code paths. pub fn is_floonet() -> bool { let param_ref = CHAIN_TYPE.read(); ChainTypes::Floonet == *param_ref } -/// Are we for real? -pub fn is_mainnet() -> bool { - let param_ref = CHAIN_TYPE.read(); - ChainTypes::Mainnet == *param_ref -} - /// Helper function to get a nonce known to create a valid POW on /// the genesis block, to prevent it taking ages. Should be fine for now /// as the genesis block POW solution turns out to be the same for every new