mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
no is_mainnet() to keep tests close to mainnet (#2496)
This commit is contained in:
parent
5dbb478d3e
commit
422db82667
1 changed files with 3 additions and 6 deletions
|
@ -267,17 +267,14 @@ pub fn is_production_mode() -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Are we in floonet?
|
/// 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 {
|
pub fn is_floonet() -> bool {
|
||||||
let param_ref = CHAIN_TYPE.read();
|
let param_ref = CHAIN_TYPE.read();
|
||||||
ChainTypes::Floonet == *param_ref
|
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
|
/// 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
|
/// 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
|
/// as the genesis block POW solution turns out to be the same for every new
|
||||||
|
|
Loading…
Reference in a new issue