From 5cec18b24ac2825c8385634e8153489ed173d2a3 Mon Sep 17 00:00:00 2001 From: Lucas Hendren Date: Wed, 17 Oct 2018 00:32:01 -0400 Subject: [PATCH] eth: Fixed styling and gen_config --- eth/config.go | 2 +- eth/gen_config.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eth/config.go b/eth/config.go index b78043bb65..1ad95af32e 100644 --- a/eth/config.go +++ b/eth/config.go @@ -122,7 +122,7 @@ type Config struct { // Miscellaneous options DocRoot string `toml:"-"` - // specify time to exit after syncing + // Specify time to exit after syncing ExitWhenSynced time.Duration // Type of the EWASM interpreter ("" for detault) diff --git a/eth/gen_config.go b/eth/gen_config.go index d401a917d2..1b947b669d 100644 --- a/eth/gen_config.go +++ b/eth/gen_config.go @@ -43,6 +43,7 @@ func (c Config) MarshalTOML() (interface{}, error) { GPO gasprice.Config EnablePreimageRecording bool DocRoot string `toml:"-"` + ExitWhenSynced time.Duration } var enc Config enc.Genesis = c.Genesis @@ -69,6 +70,7 @@ func (c Config) MarshalTOML() (interface{}, error) { enc.GPO = c.GPO enc.EnablePreimageRecording = c.EnablePreimageRecording enc.DocRoot = c.DocRoot + enc.ExitWhenSynced = c.ExitWhenSynced return &enc, nil } @@ -99,6 +101,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { GPO *gasprice.Config EnablePreimageRecording *bool DocRoot *string `toml:"-"` + ExitWhenSynced time.Duration } var dec Config if err := unmarshal(&dec); err != nil { @@ -176,5 +179,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { if dec.DocRoot != nil { c.DocRoot = *dec.DocRoot } + if dec.ExitWhenSynced != nil { + c.ExitWhenSynced = *dec.ExitWhenSynced + } return nil }