diff --git a/params/config.go b/params/config.go index c211ccd0d4..44c1292cb0 100644 --- a/params/config.go +++ b/params/config.go @@ -625,6 +625,7 @@ type ChainConfig struct { BernoulliBlock *big.Int `json:"bernoulliBlock,omitempty"` // Bernoulli switch block (nil = no fork, 0 = already on bernoulli) CurieBlock *big.Int `json:"curieBlock,omitempty"` // Curie switch block (nil = no fork, 0 = already on curie) DarwinTime *uint64 `json:"darwinTime,omitempty"` // Darwin switch time (nil = no fork, 0 = already on darwin) + DarwinV2Time *uint64 `json:"darwinv2Time,omitempty"` // DarwinV2 switch time (nil = no fork, 0 = already on darwinv2) // TerminalTotalDifficulty is the amount of total difficulty reached by // the network that triggers the consensus upgrade. @@ -861,6 +862,11 @@ func (c *ChainConfig) IsDarwin(now uint64) bool { return isForkedTime(now, c.DarwinTime) } +// IsDarwinV2 returns whether num is either equal to the DarwinV2 fork block or greater. +func (c *ChainConfig) IsDarwinV2(now uint64) bool { + return isForkedTime(now, c.DarwinV2Time) +} + // IsTerminalPoWBlock returns whether the given block is the last block of PoW stage. func (c *ChainConfig) IsTerminalPoWBlock(parentTotalDiff *big.Int, totalDiff *big.Int) bool { if c.TerminalTotalDifficulty == nil { diff --git a/params/version.go b/params/version.go index 77bb908849..0d8aacfff0 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 6 // Minor version component of the current release - VersionPatch = 1 // Patch version component of the current release + VersionPatch = 2 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string )