aboutsummaryrefslogtreecommitdiff
path: root/eth/gen_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/gen_config.go')
-rw-r--r--eth/gen_config.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/eth/gen_config.go b/eth/gen_config.go
index 6b8ddf1..d34f0b3 100644
--- a/eth/gen_config.go
+++ b/eth/gen_config.go
@@ -6,13 +6,13 @@ import (
"math/big"
"time"
+ "github.com/ava-labs/coreth/consensus/ethash"
"github.com/ava-labs/coreth/core"
"github.com/ava-labs/coreth/eth/gasprice"
"github.com/ava-labs/coreth/miner"
+ "github.com/ava-labs/coreth/params"
"github.com/ava-labs/go-ethereum/common"
- "github.com/ava-labs/go-ethereum/consensus/ethash"
"github.com/ava-labs/go-ethereum/eth/downloader"
- "github.com/ava-labs/go-ethereum/params"
)
// MarshalTOML marshals as TOML.
@@ -49,6 +49,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
RPCGasCap *big.Int `toml:",omitempty"`
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
+ OverrideIstanbul *big.Int
+ ManualCanonical bool
}
var enc Config
enc.Genesis = c.Genesis
@@ -82,6 +84,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.RPCGasCap = c.RPCGasCap
enc.Checkpoint = c.Checkpoint
enc.CheckpointOracle = c.CheckpointOracle
+ enc.OverrideIstanbul = c.OverrideIstanbul
+ enc.ManualCanonical = c.ManualCanonical
return &enc, nil
}
@@ -119,6 +123,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
RPCGasCap *big.Int `toml:",omitempty"`
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
+ OverrideIstanbul *big.Int
+ ManualCanonical *bool
}
var dec Config
if err := unmarshal(&dec); err != nil {
@@ -217,5 +223,11 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.CheckpointOracle != nil {
c.CheckpointOracle = dec.CheckpointOracle
}
+ if dec.OverrideIstanbul != nil {
+ c.OverrideIstanbul = dec.OverrideIstanbul
+ }
+ if dec.ManualCanonical != nil {
+ c.ManualCanonical = *dec.ManualCanonical
+ }
return nil
}