Skip to content

Commit

Permalink
feat: add mainnet timestamp for shanghai (#1829)
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg authored Mar 18, 2023
1 parent 100d4a9 commit 85076fb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crates/primitives/src/chain/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub static MAINNET: Lazy<ChainSpec> = Lazy::new(|| ChainSpec {
total_difficulty: U256::from(58_750_000_000_000_000_000_000_u128),
},
),
(Hardfork::Shanghai, ForkCondition::Timestamp(1681338455)),
]),
});

Expand Down Expand Up @@ -716,7 +717,17 @@ mod tests {
),
(
Head { number: 15050000, ..Default::default() },
ForkId { hash: ForkHash([0xf0, 0xaf, 0xd0, 0xe3]), next: 0 },
ForkId { hash: ForkHash([0xf0, 0xaf, 0xd0, 0xe3]), next: 1681338455 },
),
// First Shanghai block
(
Head { number: 20000000, timestamp: 1681338455, ..Default::default() },
ForkId { hash: ForkHash([0xdc, 0xe9, 0x6c, 0x2d]), next: 0 },
),
// Future Shanghai block
(
Head { number: 20000000, timestamp: 2000000000, ..Default::default() },
ForkId { hash: ForkHash([0xdc, 0xe9, 0x6c, 0x2d]), next: 0 },
),
],
);
Expand Down

0 comments on commit 85076fb

Please sign in to comment.