From 66a6cbe4a4e63da4801f7f3927d17f142f85c204 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Thu, 11 Jul 2019 09:50:21 +0800 Subject: [PATCH] eth: fix error when dump config with nil checkpoint --- eth/config.go | 4 ++-- eth/gen_config.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/eth/config.go b/eth/config.go index c296553753..6887872276 100644 --- a/eth/config.go +++ b/eth/config.go @@ -150,8 +150,8 @@ type Config struct { RPCGasCap *big.Int `toml:",omitempty"` // 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 *params.CheckpointOracleConfig + CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` } diff --git a/eth/gen_config.go b/eth/gen_config.go index a7794ffabb..bc4b55b120 100644 --- a/eth/gen_config.go +++ b/eth/gen_config.go @@ -46,9 +46,9 @@ func (c Config) MarshalTOML() (interface{}, error) { DocRoot string `toml:"-"` EWASMInterpreter string EVMInterpreter string - RPCGasCap *big.Int `toml:",omitempty"` - Checkpoint *params.TrustedCheckpoint - CheckpointOracle *params.CheckpointOracleConfig + RPCGasCap *big.Int `toml:",omitempty"` + Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` + CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` } var enc Config enc.Genesis = c.Genesis @@ -116,9 +116,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { DocRoot *string `toml:"-"` EWASMInterpreter *string EVMInterpreter *string - RPCGasCap *big.Int `toml:",omitempty"` - Checkpoint *params.TrustedCheckpoint - CheckpointOracle *params.CheckpointOracleConfig + RPCGasCap *big.Int `toml:",omitempty"` + Checkpoint *params.TrustedCheckpoint `toml:",omitempty"` + CheckpointOracle *params.CheckpointOracleConfig `toml:",omitempty"` } var dec Config if err := unmarshal(&dec); err != nil {