Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hertz fix #20

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion chain/chain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type Config struct {
LubanBlock *big.Int `json:"lubanBlock,omitempty" toml:",omitempty"` // lubanBlock switch block (nil = no fork, 0 = already activated)
PlatoBlock *big.Int `json:"platoBlock,omitempty" toml:",omitempty"` // platoBlock switch block (nil = no fork, 0 = already activated)
HertzBlock *big.Int `json:"hertzBlock,omitempty" toml:",omitempty"` // hertzBlock switch block (nil = no fork, 0 = already activated)
HertzfixBlock *big.Int `json:"hertzfixBlock,omitempty" toml:",omitempty"` // hertzfixBlock switch block (nil = no fork, 0 = already activated)
// Gnosis Chain fork blocks
PosdaoBlock *big.Int `json:"posdaoBlock,omitempty"`

Expand All @@ -100,7 +101,7 @@ func (c *Config) String() string {
engine := c.getEngine()

if c.Consensus == ParliaConsensus {
return fmt.Sprintf("{ChainID: %v Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Planck: %v, Luban: %v, Plato: %v, Hertz: %v, ShanghaiTime: %v, KeplerTime %v, Engine: %v}",
return fmt.Sprintf("{ChainID: %v Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Planck: %v, Luban: %v, Plato: %v, Hertz: %v, Hertzfix: %v, ShanghaiTime: %v, KeplerTime %v, Engine: %v}",
c.ChainID,
c.RamanujanBlock,
c.NielsBlock,
Expand All @@ -114,6 +115,7 @@ func (c *Config) String() string {
c.LubanBlock,
c.PlatoBlock,
c.HertzBlock,
c.HertzfixBlock,
c.ShanghaiTime,
c.KeplerTime,
engine,
Expand Down Expand Up @@ -408,6 +410,7 @@ func (c *Config) forkBlockNumbers() []forkBlockNumber {
{name: "lubanBlock", blockNumber: c.LubanBlock},
{name: "platoBlock", blockNumber: c.PlatoBlock},
{name: "hertzBlock", blockNumber: c.HertzBlock},
{name: "hertzfixBlock", blockNumber: c.HertzfixBlock},
{name: "berlinBlock", blockNumber: c.BerlinBlock, optional: true},
{name: "londonBlock", blockNumber: c.LondonBlock, optional: true},
{name: "arrowGlacierBlock", blockNumber: c.ArrowGlacierBlock, optional: true},
Expand Down Expand Up @@ -540,6 +543,9 @@ func (c *Config) checkCompatible(newcfg *Config, head uint64) *ConfigCompatError
if incompatible(c.HertzBlock, newcfg.HertzBlock, head) {
return newCompatError("hertz fork block", c.HertzBlock, newcfg.HertzBlock)
}
if incompatible(c.HertzfixBlock, newcfg.HertzfixBlock, head) {
return newCompatError("hertz fork block", c.HertzfixBlock, newcfg.HertzfixBlock)
}
return nil
}

Expand Down
Loading