Skip to content

Commit 9d380aa

Browse files
committed
params: allow post-merge hardforks to be enabled before the merge
Partially revert ethereum/go-ethereum#29023. This commit intentionally breaks the post-merge hardforks logic to fix the problem described in #232 (comment). Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
1 parent 14c45aa commit 9d380aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

params/config.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,6 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
958958
if chainID == nil {
959959
chainID = new(big.Int)
960960
}
961-
// disallow setting Merge out of order
962-
isMerge = isMerge && c.IsLondon(num)
963961
return Rules{
964962
ChainID: new(big.Int).Set(chainID),
965963
IsHomestead: c.IsHomestead(num),
@@ -973,9 +971,9 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
973971
IsBerlin: c.IsBerlin(num),
974972
IsLondon: c.IsLondon(num),
975973
IsMerge: isMerge,
976-
IsShanghai: isMerge && c.IsShanghai(num, timestamp),
977-
IsCancun: isMerge && c.IsCancun(num, timestamp),
978-
IsPrague: isMerge && c.IsPrague(num, timestamp),
979-
IsVerkle: isMerge && c.IsVerkle(num, timestamp),
974+
IsShanghai: c.IsShanghai(num, timestamp),
975+
IsCancun: c.IsCancun(num, timestamp),
976+
IsPrague: c.IsPrague(num, timestamp),
977+
IsVerkle: c.IsVerkle(num, timestamp),
980978
}
981979
}

0 commit comments

Comments
 (0)