@@ -639,6 +639,7 @@ type ChainConfig struct {
639
639
DarwinTime * uint64 `json:"darwinTime,omitempty"` // Darwin switch time (nil = no fork, 0 = already on darwin)
640
640
DarwinV2Time * uint64 `json:"darwinv2Time,omitempty"` // DarwinV2 switch time (nil = no fork, 0 = already on darwinv2)
641
641
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)
642
643
643
644
// TerminalTotalDifficulty is the amount of total difficulty reached by
644
645
// the network that triggers the consensus upgrade.
@@ -899,21 +900,26 @@ func (c *ChainConfig) IsCurie(num *big.Int) bool {
899
900
return isForked (c .CurieBlock , num )
900
901
}
901
902
902
- // IsDarwin returns whether num is either equal to the Darwin fork block or greater.
903
+ // IsDarwin returns whether time is either equal to the Darwin fork time or greater.
903
904
func (c * ChainConfig ) IsDarwin (now uint64 ) bool {
904
905
return isForkedTime (now , c .DarwinTime )
905
906
}
906
907
907
- // IsDarwinV2 returns whether num is either equal to the DarwinV2 fork block or greater.
908
+ // IsDarwinV2 returns whether time is either equal to the DarwinV2 fork time or greater.
908
909
func (c * ChainConfig ) IsDarwinV2 (now uint64 ) bool {
909
910
return isForkedTime (now , c .DarwinV2Time )
910
911
}
911
912
912
- // IsEuclid returns whether num is either equal to the Darwin fork block or greater.
913
+ // IsEuclid returns whether time is either equal to the Euclid fork time or greater.
913
914
func (c * ChainConfig ) IsEuclid (now uint64 ) bool {
914
915
return isForkedTime (now , c .EuclidTime )
915
916
}
916
917
918
+ // IsEuclidV2 returns whether time is either equal to the EuclidV2 fork time or greater.
919
+ func (c * ChainConfig ) IsEuclidV2 (now uint64 ) bool {
920
+ return isForkedTime (now , c .EuclidV2Time )
921
+ }
922
+
917
923
// IsTerminalPoWBlock returns whether the given block is the last block of PoW stage.
918
924
func (c * ChainConfig ) IsTerminalPoWBlock (parentTotalDiff * big.Int , totalDiff * big.Int ) bool {
919
925
if c .TerminalTotalDifficulty == nil {
@@ -1126,7 +1132,7 @@ type Rules struct {
1126
1132
IsHomestead , IsEIP150 , IsEIP155 , IsEIP158 bool
1127
1133
IsByzantium , IsConstantinople , IsPetersburg , IsIstanbul bool
1128
1134
IsBerlin , IsLondon , IsArchimedes , IsShanghai bool
1129
- IsBernoulli , IsCurie , IsDarwin , IsEuclid bool
1135
+ IsBernoulli , IsCurie , IsDarwin , IsEuclid , IsEuclidV2 bool
1130
1136
}
1131
1137
1132
1138
// Rules ensures c's ChainID is not nil.
@@ -1153,5 +1159,6 @@ func (c *ChainConfig) Rules(num *big.Int, time uint64) Rules {
1153
1159
IsCurie : c .IsCurie (num ),
1154
1160
IsDarwin : c .IsDarwin (time ),
1155
1161
IsEuclid : c .IsEuclid (time ),
1162
+ IsEuclidV2 : c .IsEuclidV2 (time ),
1156
1163
}
1157
1164
}
0 commit comments