Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ futures = "0.3"
lz4_flex = { version = "0.11", default-features = false }

# megaeth
mega-evm = { git = "https://github.com/megaeth-labs/mega-evm.git", rev = "v1.3.2" }
mega-evm = { git = "https://github.com/megaeth-labs/mega-evm.git", rev = "v1.4.0" }
metrics = "0.24"
metrics-derive = "0.1"
metrics-exporter-prometheus = { version = "0.18", default-features = false, features = ["http-listener"] }
Expand Down
8 changes: 7 additions & 1 deletion crates/validator-core/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ pub struct MegaethGenesisHardforks {
pub rex_1_time: Option<u64>,
/// Rex2 hardfork timestamp.
pub rex_2_time: Option<u64>,
/// Rex3 hardfork timestamp.
pub rex_3_time: Option<u64>,
}

impl MegaethGenesisHardforks {
Expand All @@ -124,6 +126,7 @@ impl MegaethGenesisHardforks {
(MegaHardfork::Rex.boxed(), self.rex_time.map(ForkCondition::Timestamp)),
(MegaHardfork::Rex1.boxed(), self.rex_1_time.map(ForkCondition::Timestamp)),
(MegaHardfork::Rex2.boxed(), self.rex_2_time.map(ForkCondition::Timestamp)),
(MegaHardfork::Rex3.boxed(), self.rex_3_time.map(ForkCondition::Timestamp)),
]
.into_iter()
.filter_map(|(hardfork, condition)| condition.map(|c| (hardfork, c)))
Expand All @@ -141,6 +144,7 @@ pub static MEGA_MAINNET_HARDFORKS: std::sync::LazyLock<ChainHardforks> =
(MegaHardfork::Rex.boxed(), ForkCondition::Timestamp(0)),
(MegaHardfork::Rex1.boxed(), ForkCondition::Timestamp(0)),
(MegaHardfork::Rex2.boxed(), ForkCondition::Timestamp(0)),
(MegaHardfork::Rex3.boxed(), ForkCondition::Timestamp(0)),
])
});

Expand Down Expand Up @@ -191,7 +195,8 @@ mod tests {
"miniRex2Time": 3,
"rexTime": 4,
"rex1Time": 5,
"rex2Time": 6
"rex2Time": 6,
"rex3Time": 7
}
"#;
let fields = serde_json::from_str::<OtherFields>(genesis_info).unwrap();
Expand All @@ -202,5 +207,6 @@ mod tests {
assert_eq!(hardforks.rex_time, Some(4));
assert_eq!(hardforks.rex_1_time, Some(5));
assert_eq!(hardforks.rex_2_time, Some(6));
assert_eq!(hardforks.rex_3_time, Some(7));
}
}