mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
eth: Fixed styling and gen_config
This commit is contained in:
parent
832035636b
commit
5cec18b24a
2 changed files with 7 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue