mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 20:16:36 +00:00
eth/ethconfig : fix eth generate config (#32929)
This commit is contained in:
parent
b373d797d8
commit
0a2c21acd5
1 changed files with 20 additions and 8 deletions
|
|
@ -58,10 +58,12 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
||||||
RPCGasCap uint64
|
RPCGasCap uint64
|
||||||
RPCEVMTimeout time.Duration
|
RPCEVMTimeout time.Duration
|
||||||
RPCTxFeeCap float64
|
RPCTxFeeCap float64
|
||||||
OverrideOsaka *uint64 `toml:",omitempty"`
|
OverrideOsaka *uint64 `toml:",omitempty"`
|
||||||
OverrideBPO1 *uint64 `toml:",omitempty"`
|
OverrideBPO1 *uint64 `toml:",omitempty"`
|
||||||
OverrideBPO2 *uint64 `toml:",omitempty"`
|
OverrideBPO2 *uint64 `toml:",omitempty"`
|
||||||
OverrideVerkle *uint64 `toml:",omitempty"`
|
OverrideVerkle *uint64 `toml:",omitempty"`
|
||||||
|
TxSyncDefaultTimeout time.Duration `toml:",omitempty"`
|
||||||
|
TxSyncMaxTimeout time.Duration `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
var enc Config
|
var enc Config
|
||||||
enc.Genesis = c.Genesis
|
enc.Genesis = c.Genesis
|
||||||
|
|
@ -109,6 +111,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
|
||||||
enc.OverrideBPO1 = c.OverrideBPO1
|
enc.OverrideBPO1 = c.OverrideBPO1
|
||||||
enc.OverrideBPO2 = c.OverrideBPO2
|
enc.OverrideBPO2 = c.OverrideBPO2
|
||||||
enc.OverrideVerkle = c.OverrideVerkle
|
enc.OverrideVerkle = c.OverrideVerkle
|
||||||
|
enc.TxSyncDefaultTimeout = c.TxSyncDefaultTimeout
|
||||||
|
enc.TxSyncMaxTimeout = c.TxSyncMaxTimeout
|
||||||
return &enc, nil
|
return &enc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -156,10 +160,12 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
||||||
RPCGasCap *uint64
|
RPCGasCap *uint64
|
||||||
RPCEVMTimeout *time.Duration
|
RPCEVMTimeout *time.Duration
|
||||||
RPCTxFeeCap *float64
|
RPCTxFeeCap *float64
|
||||||
OverrideOsaka *uint64 `toml:",omitempty"`
|
OverrideOsaka *uint64 `toml:",omitempty"`
|
||||||
OverrideBPO1 *uint64 `toml:",omitempty"`
|
OverrideBPO1 *uint64 `toml:",omitempty"`
|
||||||
OverrideBPO2 *uint64 `toml:",omitempty"`
|
OverrideBPO2 *uint64 `toml:",omitempty"`
|
||||||
OverrideVerkle *uint64 `toml:",omitempty"`
|
OverrideVerkle *uint64 `toml:",omitempty"`
|
||||||
|
TxSyncDefaultTimeout *time.Duration `toml:",omitempty"`
|
||||||
|
TxSyncMaxTimeout *time.Duration `toml:",omitempty"`
|
||||||
}
|
}
|
||||||
var dec Config
|
var dec Config
|
||||||
if err := unmarshal(&dec); err != nil {
|
if err := unmarshal(&dec); err != nil {
|
||||||
|
|
@ -300,5 +306,11 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
||||||
if dec.OverrideVerkle != nil {
|
if dec.OverrideVerkle != nil {
|
||||||
c.OverrideVerkle = dec.OverrideVerkle
|
c.OverrideVerkle = dec.OverrideVerkle
|
||||||
}
|
}
|
||||||
|
if dec.TxSyncDefaultTimeout != nil {
|
||||||
|
c.TxSyncDefaultTimeout = *dec.TxSyncDefaultTimeout
|
||||||
|
}
|
||||||
|
if dec.TxSyncMaxTimeout != nil {
|
||||||
|
c.TxSyncMaxTimeout = *dec.TxSyncMaxTimeout
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue