mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Minor globals cleanup
This commit is contained in:
parent
7571a16d54
commit
567baa479f
2 changed files with 8 additions and 21 deletions
|
@ -119,7 +119,7 @@ pub fn genesis_testnet3() -> core::Block {
|
|||
..time::empty_tm()
|
||||
},
|
||||
total_difficulty: Difficulty::from_num(global::initial_block_difficulty()),
|
||||
nonce: 1060,
|
||||
nonce: 0,
|
||||
pow: core::Proof::new(vec![
|
||||
0x1940730, 0x333b9d0, 0x4739d6f, 0x4c6cfb1, 0x6e3d6c3, 0x74408a3, 0x7ba2bd2,
|
||||
0x83e2024, 0x8ca22b5, 0x9d39ab8, 0xb6646dd, 0xc6698b6, 0xc6f78fe, 0xc99b662,
|
||||
|
|
|
@ -59,9 +59,9 @@ pub const TESTING_INITIAL_DIFFICULTY: u64 = 1;
|
|||
/// Testnet 2 initial block difficulty, high to see how it goes
|
||||
pub const TESTNET2_INITIAL_DIFFICULTY: u64 = 1000;
|
||||
|
||||
/// Testnet 2 initial block difficulty, moderately hight, taking into account
|
||||
/// Testnet 3 initial block difficulty, moderately high, taking into account
|
||||
/// a 30x Cuckoo adjustment factor
|
||||
pub const TESTNET3_INITIAL_DIFFICULTY: u64 = 15000;
|
||||
pub const TESTNET3_INITIAL_DIFFICULTY: u64 = 30000;
|
||||
|
||||
/// Types of chain a server can run with, dictates the genesis block and
|
||||
/// and mining parameters used.
|
||||
|
@ -106,9 +106,7 @@ pub fn min_sizeshift() -> u8 {
|
|||
ChainTypes::AutomatedTesting => AUTOMATED_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::UserTesting => USER_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::Testnet1 => USER_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::Testnet2 => DEFAULT_MIN_SIZESHIFT,
|
||||
ChainTypes::Testnet3 => DEFAULT_MIN_SIZESHIFT,
|
||||
ChainTypes::Mainnet => DEFAULT_MIN_SIZESHIFT,
|
||||
_ => DEFAULT_MIN_SIZESHIFT,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,9 +119,7 @@ pub fn ref_sizeshift() -> u8 {
|
|||
ChainTypes::AutomatedTesting => AUTOMATED_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::UserTesting => USER_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::Testnet1 => USER_TESTING_MIN_SIZESHIFT,
|
||||
ChainTypes::Testnet2 => REFERENCE_SIZESHIFT,
|
||||
ChainTypes::Testnet3 => REFERENCE_SIZESHIFT,
|
||||
ChainTypes::Mainnet => REFERENCE_SIZESHIFT,
|
||||
_ => REFERENCE_SIZESHIFT,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,10 +129,7 @@ pub fn proofsize() -> usize {
|
|||
match *param_ref {
|
||||
ChainTypes::AutomatedTesting => AUTOMATED_TESTING_PROOF_SIZE,
|
||||
ChainTypes::UserTesting => USER_TESTING_PROOF_SIZE,
|
||||
ChainTypes::Testnet1 => PROOFSIZE,
|
||||
ChainTypes::Testnet2 => PROOFSIZE,
|
||||
ChainTypes::Testnet3 => PROOFSIZE,
|
||||
ChainTypes::Mainnet => PROOFSIZE,
|
||||
_ => PROOFSIZE,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,10 +139,7 @@ pub fn coinbase_maturity() -> u64 {
|
|||
match *param_ref {
|
||||
ChainTypes::AutomatedTesting => AUTOMATED_TESTING_COINBASE_MATURITY,
|
||||
ChainTypes::UserTesting => USER_TESTING_COINBASE_MATURITY,
|
||||
ChainTypes::Testnet1 => COINBASE_MATURITY,
|
||||
ChainTypes::Testnet2 => COINBASE_MATURITY,
|
||||
ChainTypes::Testnet3 => COINBASE_MATURITY,
|
||||
ChainTypes::Mainnet => COINBASE_MATURITY,
|
||||
_ => COINBASE_MATURITY,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,10 +162,7 @@ pub fn cut_through_horizon() -> u32 {
|
|||
match *param_ref {
|
||||
ChainTypes::AutomatedTesting => TESTING_CUT_THROUGH_HORIZON,
|
||||
ChainTypes::UserTesting => TESTING_CUT_THROUGH_HORIZON,
|
||||
ChainTypes::Testnet1 => CUT_THROUGH_HORIZON,
|
||||
ChainTypes::Testnet2 => CUT_THROUGH_HORIZON,
|
||||
ChainTypes::Testnet3 => CUT_THROUGH_HORIZON,
|
||||
ChainTypes::Mainnet => CUT_THROUGH_HORIZON,
|
||||
_ => CUT_THROUGH_HORIZON,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue