mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth: fix error when dump config with nil checkpoint
This commit is contained in:
parent
72029f0f88
commit
66a6cbe4a4
2 changed files with 8 additions and 8 deletions
|
|
@ -150,8 +150,8 @@ type Config struct {
|
||||||
RPCGasCap *big.Int `toml:",omitempty"`
|
RPCGasCap *big.Int `toml:",omitempty"`
|
||||||
|
|
||||||
// Checkpoint is a hardcoded checkpoint which can be nil.
|
// Checkpoint is a hardcoded checkpoint which can be nil.
|
||||||
Checkpoint *params.TrustedCheckpoint
|
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
|
||||||
|
|
||||||
// CheckpointOracle is the configuration for checkpoint oracle.
|
// CheckpointOracle is the configuration for checkpoint oracle.
|
||||||
CheckpointOracle *params.CheckpointOracleConfig
|
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,9 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
||||||
DocRoot string `toml:"-"`
|
DocRoot string `toml:"-"`
|
||||||
EWASMInterpreter string
|
EWASMInterpreter string
|
||||||
EVMInterpreter string
|
EVMInterpreter string
|
||||||
RPCGasCap *big.Int `toml:",omitempty"`
|
RPCGasCap *big.Int `toml:",omitempty"`
|
||||||
Checkpoint *params.TrustedCheckpoint
|
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
|
||||||
CheckpointOracle *params.CheckpointOracleConfig
|
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
var enc Config
|
var enc Config
|
||||||
enc.Genesis = c.Genesis
|
enc.Genesis = c.Genesis
|
||||||
|
|
@ -116,9 +116,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
||||||
DocRoot *string `toml:"-"`
|
DocRoot *string `toml:"-"`
|
||||||
EWASMInterpreter *string
|
EWASMInterpreter *string
|
||||||
EVMInterpreter *string
|
EVMInterpreter *string
|
||||||
RPCGasCap *big.Int `toml:",omitempty"`
|
RPCGasCap *big.Int `toml:",omitempty"`
|
||||||
Checkpoint *params.TrustedCheckpoint
|
Checkpoint *params.TrustedCheckpoint `toml:",omitempty"`
|
||||||
CheckpointOracle *params.CheckpointOracleConfig
|
CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
var dec Config
|
var dec Config
|
||||||
if err := unmarshal(&dec); err != nil {
|
if err := unmarshal(&dec); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue