feat: add mainnet timestamp for shanghai (#1829)

This commit is contained in:
Bjerg
2023-03-18 15:10:57 +01:00
committed by GitHub
parent 100d4a90c6
commit 85076fbde5

View File

@ -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)),
]),
});
@ -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 },
),
],
);