use secondary pow size for min header size calc

This commit is contained in:
yeastplume 2018-10-16 13:19:09 +01:00
parent 5bcc4508fd
commit f38d62287f

View file

@ -18,8 +18,7 @@
use consensus::HeaderInfo; use consensus::HeaderInfo;
use consensus::{ use consensus::{
BLOCK_TIME_SEC, COINBASE_MATURITY, CUT_THROUGH_HORIZON, DEFAULT_MIN_EDGE_BITS, BLOCK_TIME_SEC, COINBASE_MATURITY, CUT_THROUGH_HORIZON, SECOND_POW_EDGE_BITS, DIFFICULTY_ADJUST_WINDOW, INITIAL_DIFFICULTY, MEDIAN_TIME_WINDOW, PROOFSIZE,
DIFFICULTY_ADJUST_WINDOW, INITIAL_DIFFICULTY, MEDIAN_TIME_WINDOW, PROOFSIZE,
BASE_EDGE_BITS, BASE_EDGE_BITS,
}; };
use pow::{self, CuckatooContext, EdgeType, PoWContext}; use pow::{self, CuckatooContext, EdgeType, PoWContext};
@ -153,7 +152,7 @@ pub fn min_edge_bits() -> u8 {
ChainTypes::AutomatedTesting => AUTOMATED_TESTING_MIN_EDGE_BITS, ChainTypes::AutomatedTesting => AUTOMATED_TESTING_MIN_EDGE_BITS,
ChainTypes::UserTesting => USER_TESTING_MIN_EDGE_BITS, ChainTypes::UserTesting => USER_TESTING_MIN_EDGE_BITS,
ChainTypes::Testnet1 => USER_TESTING_MIN_EDGE_BITS, ChainTypes::Testnet1 => USER_TESTING_MIN_EDGE_BITS,
_ => DEFAULT_MIN_EDGE_BITS, _ => SECOND_POW_EDGE_BITS,
} }
} }