mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-15 02:08:09 -05:00
test(op-chainspec): add isthmus checks (#17698)
This commit is contained in:
@@ -810,6 +810,7 @@ mod tests {
|
||||
"fjordTime": 50,
|
||||
"graniteTime": 51,
|
||||
"holoceneTime": 52,
|
||||
"isthmusTime": 53,
|
||||
"optimism": {
|
||||
"eip1559Elasticity": 60,
|
||||
"eip1559Denominator": 70
|
||||
@@ -833,6 +834,8 @@ mod tests {
|
||||
assert_eq!(actual_granite_timestamp, Some(serde_json::Value::from(51)).as_ref());
|
||||
let actual_holocene_timestamp = genesis.config.extra_fields.get("holoceneTime");
|
||||
assert_eq!(actual_holocene_timestamp, Some(serde_json::Value::from(52)).as_ref());
|
||||
let actual_isthmus_timestamp = genesis.config.extra_fields.get("isthmusTime");
|
||||
assert_eq!(actual_isthmus_timestamp, Some(serde_json::Value::from(53)).as_ref());
|
||||
|
||||
let optimism_object = genesis.config.extra_fields.get("optimism").unwrap();
|
||||
assert_eq!(
|
||||
@@ -879,6 +882,7 @@ mod tests {
|
||||
"fjordTime": 50,
|
||||
"graniteTime": 51,
|
||||
"holoceneTime": 52,
|
||||
"isthmusTime": 53,
|
||||
"optimism": {
|
||||
"eip1559Elasticity": 60,
|
||||
"eip1559Denominator": 70,
|
||||
@@ -903,6 +907,8 @@ mod tests {
|
||||
assert_eq!(actual_granite_timestamp, Some(serde_json::Value::from(51)).as_ref());
|
||||
let actual_holocene_timestamp = genesis.config.extra_fields.get("holoceneTime");
|
||||
assert_eq!(actual_holocene_timestamp, Some(serde_json::Value::from(52)).as_ref());
|
||||
let actual_isthmus_timestamp = genesis.config.extra_fields.get("isthmusTime");
|
||||
assert_eq!(actual_isthmus_timestamp, Some(serde_json::Value::from(53)).as_ref());
|
||||
|
||||
let optimism_object = genesis.config.extra_fields.get("optimism").unwrap();
|
||||
assert_eq!(
|
||||
|
||||
@@ -158,7 +158,8 @@ mod tests {
|
||||
"ecotone_time": 1710374401,
|
||||
"fjord_time": 1720627201,
|
||||
"granite_time": 1726070401,
|
||||
"holocene_time": 1736445601
|
||||
"holocene_time": 1736445601,
|
||||
"isthmus_time": 1746806401
|
||||
},
|
||||
"optimism": {
|
||||
"eip1559_elasticity": 6,
|
||||
@@ -179,6 +180,7 @@ mod tests {
|
||||
assert_eq!(config.hardforks.fjord_time, Some(1720627201));
|
||||
assert_eq!(config.hardforks.granite_time, Some(1726070401));
|
||||
assert_eq!(config.hardforks.holocene_time, Some(1736445601));
|
||||
assert_eq!(config.hardforks.isthmus_time, Some(1746806401));
|
||||
// optimism
|
||||
assert_eq!(config.optimism.as_ref().unwrap().eip1559_elasticity, 6);
|
||||
assert_eq!(config.optimism.as_ref().unwrap().eip1559_denominator, 50);
|
||||
@@ -196,7 +198,7 @@ mod tests {
|
||||
fjord_time: Some(1720627201),
|
||||
granite_time: Some(1726070401),
|
||||
holocene_time: Some(1736445601),
|
||||
isthmus_time: None,
|
||||
isthmus_time: Some(1746806401),
|
||||
optimism: Option::from(ChainConfigExtraFieldsOptimism {
|
||||
eip1559_elasticity: 6,
|
||||
eip1559_denominator: 50,
|
||||
@@ -212,7 +214,7 @@ mod tests {
|
||||
assert_eq!(value.get("fjordTime").unwrap(), 1720627201);
|
||||
assert_eq!(value.get("graniteTime").unwrap(), 1726070401);
|
||||
assert_eq!(value.get("holoceneTime").unwrap(), 1736445601);
|
||||
assert_eq!(value.get("isthmusTime"), None);
|
||||
assert_eq!(value.get("isthmusTime").unwrap(), 1746806401);
|
||||
let optimism = value.get("optimism").unwrap();
|
||||
assert_eq!(optimism.get("eip1559Elasticity").unwrap(), 6);
|
||||
assert_eq!(optimism.get("eip1559Denominator").unwrap(), 50);
|
||||
@@ -242,7 +244,7 @@ mod tests {
|
||||
assert_eq!(chain_config.merge_netsplit_block, Some(0));
|
||||
assert_eq!(chain_config.shanghai_time, Some(1704992401));
|
||||
assert_eq!(chain_config.cancun_time, Some(1710374401));
|
||||
assert_eq!(chain_config.prague_time, None);
|
||||
assert_eq!(chain_config.prague_time, Some(1746806401));
|
||||
assert_eq!(chain_config.osaka_time, None);
|
||||
assert_eq!(chain_config.terminal_total_difficulty, Some(U256::ZERO));
|
||||
assert!(chain_config.terminal_total_difficulty_passed);
|
||||
@@ -256,7 +258,7 @@ mod tests {
|
||||
assert_eq!(chain_config.extra_fields.get("fjordTime").unwrap(), 1720627201);
|
||||
assert_eq!(chain_config.extra_fields.get("graniteTime").unwrap(), 1726070401);
|
||||
assert_eq!(chain_config.extra_fields.get("holoceneTime").unwrap(), 1736445601);
|
||||
assert_eq!(chain_config.extra_fields.get("isthmusTime"), None);
|
||||
assert_eq!(chain_config.extra_fields.get("isthmusTime").unwrap(), 1746806401);
|
||||
let optimism = chain_config.extra_fields.get("optimism").unwrap();
|
||||
assert_eq!(optimism.get("eip1559Elasticity").unwrap(), 6);
|
||||
assert_eq!(optimism.get("eip1559Denominator").unwrap(), 50);
|
||||
@@ -274,7 +276,8 @@ mod tests {
|
||||
"ecotone_time": 1710374401,
|
||||
"fjord_time": 1720627201,
|
||||
"granite_time": 1726070401,
|
||||
"holocene_time": 1736445601
|
||||
"holocene_time": 1736445601,
|
||||
"isthmus_time": 1746806401
|
||||
},
|
||||
"optimism": {
|
||||
"eip1559_elasticity": 6,
|
||||
@@ -289,7 +292,7 @@ mod tests {
|
||||
assert_eq!(chain_config.chain_id, 10);
|
||||
assert_eq!(chain_config.shanghai_time, Some(1704992401));
|
||||
assert_eq!(chain_config.cancun_time, Some(1710374401));
|
||||
assert_eq!(chain_config.prague_time, None);
|
||||
assert_eq!(chain_config.prague_time, Some(1746806401));
|
||||
assert_eq!(chain_config.berlin_block, Some(3950000));
|
||||
assert_eq!(chain_config.london_block, Some(105235063));
|
||||
assert_eq!(chain_config.arrow_glacier_block, Some(105235063));
|
||||
@@ -303,7 +306,7 @@ mod tests {
|
||||
assert_eq!(chain_config.extra_fields.get("fjordTime").unwrap(), 1720627201);
|
||||
assert_eq!(chain_config.extra_fields.get("graniteTime").unwrap(), 1726070401);
|
||||
assert_eq!(chain_config.extra_fields.get("holoceneTime").unwrap(), 1736445601);
|
||||
assert_eq!(chain_config.extra_fields.get("isthmusTime"), None);
|
||||
assert_eq!(chain_config.extra_fields.get("isthmusTime").unwrap(), 1746806401);
|
||||
let optimism = chain_config.extra_fields.get("optimism").unwrap();
|
||||
assert_eq!(optimism.get("eip1559Elasticity").unwrap(), 6);
|
||||
assert_eq!(optimism.get("eip1559Denominator").unwrap(), 50);
|
||||
|
||||
Reference in New Issue
Block a user