Skip to content

consensus/misc/eip1559/eip1559.go — Version Comparison

v1.16.8 v1.17.3
Branch etc/v1.16.8-full-node etc/v1.17.3-full-node
Delta +4 -0 +4 -0
ETC delta on v1.16.8 (+4 -0)
diff --git a/consensus/misc/eip1559/eip1559.go b/consensus/misc/eip1559/eip1559.go
index a90bd744b..1222cec2e 100644
--- a/consensus/misc/eip1559/eip1559.go
+++ b/consensus/misc/eip1559/eip1559.go
@@ -58,6 +58,10 @@ func CalcBaseFee(config *params.ChainConfig, parent *types.Header) *big.Int {
    if !config.IsLondon(parent.Number) {
        return new(big.Int).SetUint64(params.InitialBaseFee)
    }
+   // If London is active but EIP-1559 is not (e.g., ETC Mystique), return 0.
+   if !config.IsEIP1559(parent.Number) {
+       return common.Big0
+   }

    parentGasTarget := parent.GasLimit / config.ElasticityMultiplier()
    // If the parent gasUsed is the same as the target, the baseFee remains unchanged.
ETC delta on v1.17.3 (+4 -0)
diff --git a/consensus/misc/eip1559/eip1559.go b/consensus/misc/eip1559/eip1559.go
index 9a4cd320a..245fa483c 100644
--- a/consensus/misc/eip1559/eip1559.go
+++ b/consensus/misc/eip1559/eip1559.go
@@ -62,6 +62,10 @@ func CalcBaseFee(config *params.ChainConfig, parent *types.Header) *big.Int {
    if !config.IsLondon(parent.Number) {
        return new(big.Int).SetUint64(params.InitialBaseFee)
    }
+   // If London is active but EIP-1559 is not (e.g., ETC Mystique), return 0.
+   if !config.IsEIP1559(parent.Number) {
+       return common.Big0
+   }

    parentGasTarget := parent.GasLimit / config.ElasticityMultiplier()
    // If the parent gasUsed is the same as the target, the baseFee remains unchanged.

← Back to Version Comparison