From 408ae75aa46243ae0019aa62b6facc4273015e39 Mon Sep 17 00:00:00 2001 From: Delweng Date: Thu, 11 Jul 2024 21:54:52 +0800 Subject: [PATCH] feat(genesis): rm EIP150Hash (#1039) * feat(genesis): rm eip150_hash Signed-off-by: jsvisa * fix testcase Signed-off-by: jsvisa --------- Signed-off-by: jsvisa --- crates/genesis/src/lib.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/crates/genesis/src/lib.rs b/crates/genesis/src/lib.rs index d75808a8a7c..20156ad2818 100644 --- a/crates/genesis/src/lib.rs +++ b/crates/genesis/src/lib.rs @@ -255,7 +255,7 @@ impl GenesisAccount { /// Encapsulates parameters shaping network evolution and behavior. /// /// See [geth's `ChainConfig` -/// struct](https://github.com/ethereum/go-ethereum/blob/64dccf7aa411c5c7cd36090c3d9b9892945ae813/params/config.go#L349) +/// struct](https://github.com/ethereum/go-ethereum/blob/v1.14.0/params/config.go#L326) /// for the source of each field. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(default, rename_all = "camelCase")] @@ -287,10 +287,6 @@ pub struct ChainConfig { )] pub eip150_block: Option, - /// The [EIP-150](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-150.md) hard fork hash. - #[serde(skip_serializing_if = "Option::is_none")] - pub eip150_hash: Option, - /// The [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) hard fork block. #[serde( skip_serializing_if = "Option::is_none", @@ -528,7 +524,6 @@ impl Default for ChainConfig { dao_fork_block: None, dao_fork_support: false, eip150_block: None, - eip150_hash: None, eip155_block: None, eip158_block: None, byzantium_block: None, @@ -987,7 +982,6 @@ mod tests { "chainId": 1337, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, @@ -1020,9 +1014,6 @@ mod tests { let expected_genesis = Genesis { config: ChainConfig { chain_id: 1337, - eip150_hash: Some( - hex!("0000000000000000000000000000000000000000000000000000000000000000").into(), - ), homestead_block: Some(0), eip150_block: Some(0), eip155_block: Some(0), @@ -1065,7 +1056,6 @@ mod tests { "chainId": 1337, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, @@ -1097,9 +1087,6 @@ mod tests { let expected_genesis = Genesis { config: ChainConfig { chain_id: 1337, - eip150_hash: Some( - hex!("0000000000000000000000000000000000000000000000000000000000000000").into(), - ), homestead_block: Some(0), eip150_block: Some(0), eip155_block: Some(0),