eth/ethconfig: update file gen_config.go (#1822)

This commit is contained in:
Daniel Liu 2025-12-08 15:24:20 +08:00 committed by GitHub
parent 8eb5fa7666
commit 52f682065a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,6 +27,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
LightServ int `toml:",omitempty"`
LightPeers int `toml:",omitempty"`
SkipBcVersionCheck bool `toml:"-"`
DeleteAllBadBlocks bool `toml:"-"`
DatabaseHandles int `toml:"-"`
DatabaseCache int
TrieCleanCache int
@ -56,6 +57,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.LightServ = c.LightServ
enc.LightPeers = c.LightPeers
enc.SkipBcVersionCheck = c.SkipBcVersionCheck
enc.DeleteAllBadBlocks = c.DeleteAllBadBlocks
enc.DatabaseHandles = c.DatabaseHandles
enc.DatabaseCache = c.DatabaseCache
enc.TrieCleanCache = c.TrieCleanCache
@ -89,6 +91,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
LightServ *int `toml:",omitempty"`
LightPeers *int `toml:",omitempty"`
SkipBcVersionCheck *bool `toml:"-"`
DeleteAllBadBlocks *bool `toml:"-"`
DatabaseHandles *int `toml:"-"`
DatabaseCache *int
TrieCleanCache *int
@ -137,6 +140,9 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.SkipBcVersionCheck != nil {
c.SkipBcVersionCheck = *dec.SkipBcVersionCheck
}
if dec.DeleteAllBadBlocks != nil {
c.DeleteAllBadBlocks = *dec.DeleteAllBadBlocks
}
if dec.DatabaseHandles != nil {
c.DatabaseHandles = *dec.DatabaseHandles
}