|
|
@ -528,7 +528,11 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, head *big.Int) *Confi |
|
|
|
return newCompatError("Constantinople fork block", c.ConstantinopleBlock, newcfg.ConstantinopleBlock) |
|
|
|
return newCompatError("Constantinople fork block", c.ConstantinopleBlock, newcfg.ConstantinopleBlock) |
|
|
|
} |
|
|
|
} |
|
|
|
if isForkIncompatible(c.PetersburgBlock, newcfg.PetersburgBlock, head) { |
|
|
|
if isForkIncompatible(c.PetersburgBlock, newcfg.PetersburgBlock, head) { |
|
|
|
return newCompatError("Petersburg fork block", c.PetersburgBlock, newcfg.PetersburgBlock) |
|
|
|
// the only case where we allow Petersburg to be set in the past is if it is equal to Constantinople
|
|
|
|
|
|
|
|
// mainly to satisfy fork ordering requirements which state that Petersburg fork be set if Constantinople fork is set
|
|
|
|
|
|
|
|
if isForkIncompatible(c.ConstantinopleBlock, newcfg.PetersburgBlock, head) { |
|
|
|
|
|
|
|
return newCompatError("Petersburg fork block", c.PetersburgBlock, newcfg.PetersburgBlock) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if isForkIncompatible(c.IstanbulBlock, newcfg.IstanbulBlock, head) { |
|
|
|
if isForkIncompatible(c.IstanbulBlock, newcfg.IstanbulBlock, head) { |
|
|
|
return newCompatError("Istanbul fork block", c.IstanbulBlock, newcfg.IstanbulBlock) |
|
|
|
return newCompatError("Istanbul fork block", c.IstanbulBlock, newcfg.IstanbulBlock) |
|
|
|