Skip to content

Commit e126b08

Browse files
committed
retesteth: implement istanbul support
1 parent 060e33f commit e126b08

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/geth/retesteth.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ type CParamsParams struct {
132132
ByzantiumForkBlock *math.HexOrDecimal64 `json:"byzantiumForkBlock"`
133133
ConstantinopleForkBlock *math.HexOrDecimal64 `json:"constantinopleForkBlock"`
134134
ConstantinopleFixForkBlock *math.HexOrDecimal64 `json:"constantinopleFixForkBlock"`
135+
IstanbulBlock *math.HexOrDecimal64 `json:"istanbulForkBlock"`
135136
ChainID *math.HexOrDecimal256 `json:"chainID"`
136137
MaximumExtraDataSize math.HexOrDecimal64 `json:"maximumExtraDataSize"`
137138
TieBreakingGas bool `json:"tieBreakingGas"`
@@ -319,6 +320,7 @@ func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainPa
319320
byzantiumBlock *big.Int
320321
constantinopleBlock *big.Int
321322
petersburgBlock *big.Int
323+
istanbulBlock *big.Int
322324
)
323325
if chainParams.Params.HomesteadForkBlock != nil {
324326
homesteadBlock = big.NewInt(int64(*chainParams.Params.HomesteadForkBlock))
@@ -345,6 +347,10 @@ func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainPa
345347
if constantinopleBlock != nil && petersburgBlock == nil {
346348
petersburgBlock = big.NewInt(100000000000)
347349
}
350+
if chainParams.Params.IstanbulBlock != nil {
351+
istanbulBlock = big.NewInt(int64(*chainParams.Params.IstanbulBlock))
352+
}
353+
348354
genesis := &core.Genesis{
349355
Config: &params.ChainConfig{
350356
ChainID: chainId,
@@ -357,6 +363,7 @@ func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainPa
357363
ByzantiumBlock: byzantiumBlock,
358364
ConstantinopleBlock: constantinopleBlock,
359365
PetersburgBlock: petersburgBlock,
366+
IstanbulBlock: istanbulBlock,
360367
},
361368
Nonce: uint64(chainParams.Genesis.Nonce),
362369
Timestamp: uint64(chainParams.Genesis.Timestamp),

0 commit comments

Comments
 (0)