thread local chain type vs global chain type (#3327)
* Introduce GLOBAL_CHAIN_TYPE and make CHAIN_TYPE thread_local. This makes testing more explicit and significantly more robust. * set_local_chain_type() in tests * cleanup - weird * get pool tests working with explicit local chain_type config * core tests working with explicit local chain_type * p2p tests working with explicit local chain_type * store tests working * cleanup, feedback
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ fn max_msg_size(msg_type: Type) -> u64 {
|
||||
}
|
||||
|
||||
fn magic() -> [u8; 2] {
|
||||
match *global::CHAIN_TYPE.read() {
|
||||
match global::get_chain_type() {
|
||||
global::ChainTypes::Floonet => FLOONET_MAGIC,
|
||||
global::ChainTypes::Mainnet => MAINNET_MAGIC,
|
||||
_ => OTHER_MAGIC,
|
||||
|
||||
Reference in New Issue
Block a user