Skip to content

Commit f607c18

Browse files
author
colinlyguo
committed
add EuclidV2Time in ChainConfig
1 parent 1d7bf30 commit f607c18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

params/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ type ChainConfig struct {
639639
DarwinTime *uint64 `json:"darwinTime,omitempty"` // Darwin switch time (nil = no fork, 0 = already on darwin)
640640
DarwinV2Time *uint64 `json:"darwinv2Time,omitempty"` // DarwinV2 switch time (nil = no fork, 0 = already on darwinv2)
641641
EuclidTime *uint64 `json:"euclidTime,omitempty"` // Euclid switch time (nil = no fork, 0 = already on euclid)
642+
EuclidV2Time *uint64 `json:"euclidv2Time,omitempty"` // EuclidV2 switch time (nil = no fork, 0 = already on euclidv2)
642643

643644
// TerminalTotalDifficulty is the amount of total difficulty reached by
644645
// the network that triggers the consensus upgrade.
@@ -916,7 +917,7 @@ func (c *ChainConfig) IsEuclid(now uint64) bool {
916917

917918
// IsEuclidV2 returns whether time is either equal to the EuclidV2 fork time or greater.
918919
func (c *ChainConfig) IsEuclidV2(now uint64) bool {
919-
return false // TODO: add EuclidV2 fork time
920+
return isForkedTime(now, c.EuclidV2Time)
920921
}
921922

922923
// IsTerminalPoWBlock returns whether the given block is the last block of PoW stage.

0 commit comments

Comments
 (0)