diff --git a/chain/chain_config.go b/chain/chain_config.go index 0e973926e..dbd143dcf 100644 --- a/chain/chain_config.go +++ b/chain/chain_config.go @@ -82,6 +82,9 @@ type Config struct { Eip1559FeeCollector *common.Address `json:"eip1559FeeCollector,omitempty"` // (Optional) Address where burnt EIP-1559 fees go to Eip1559FeeCollectorTransition *big.Int `json:"eip1559FeeCollectorTransition,omitempty"` // (Optional) Block from which burnt EIP-1559 fees go to the Eip1559FeeCollector + // Bor fork blocks + CalcuttaBlock *big.Int `json:"calcuttaBlock,omitempty"` + // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` @@ -255,6 +258,15 @@ func (c *Config) IsOnNano(num *big.Int) bool { return numEqual(c.NanoBlock, num) } +// IsCalcutta returns whether num is either equal to the euler fork block or greater. +func (c *Config) IsCalcutta(num uint64) bool { + return isForked(c.CalcuttaBlock, num) +} + +func (c *Config) IsOnCalcutta(num *big.Int) bool { + return numEqual(c.CalcuttaBlock, num) +} + // IsMuirGlacier returns whether num is either equal to the Muir Glacier (EIP-2384) fork block or greater. func (c *Config) IsMuirGlacier(num uint64) bool { return isForked(c.MuirGlacierBlock, num)