mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
Miner configuration is unified under [Eth.Miner] (GasCeil/GasPrice/Etherbase/ExtraData), replacing legacy top-level [Eth] miner keys. Operational impact: existing config files using [Eth].GasPrice/[Eth].Etherbase/[Eth].ExtraData must be migrated before upgrade. Behavior update: gasprice=0 remains valid; only negative gas prices are sanitized at startup. Default change: XDCGenesisGasLimit is reduced to 42,000,000 and now feeds miner default GasCeil (including default --miner-gaslimit), so nodes relying on defaults should review capacity expectations.
194 lines
5.4 KiB
Go
194 lines
5.4 KiB
Go
// Code generated by github.com/fjl/gencodec. DO NOT EDIT.
|
|
|
|
package ethconfig
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/XinFinOrg/XDPoSChain/core"
|
|
"github.com/XinFinOrg/XDPoSChain/core/txpool/legacypool"
|
|
"github.com/XinFinOrg/XDPoSChain/eth/downloader"
|
|
"github.com/XinFinOrg/XDPoSChain/eth/gasprice"
|
|
"github.com/XinFinOrg/XDPoSChain/miner"
|
|
)
|
|
|
|
// MarshalTOML marshals as TOML.
|
|
func (c Config) MarshalTOML() (interface{}, error) {
|
|
type Config struct {
|
|
Genesis *core.Genesis `toml:",omitempty"`
|
|
NetworkId uint64
|
|
SyncMode downloader.SyncMode
|
|
NoPruning bool
|
|
Prefetch bool
|
|
LightServ int `toml:",omitempty"`
|
|
LightPeers int `toml:",omitempty"`
|
|
SkipBcVersionCheck bool `toml:"-"`
|
|
DeleteAllBadBlocks bool `toml:"-"`
|
|
DatabaseHandles int `toml:"-"`
|
|
DatabaseCache int
|
|
TrieCleanCache int
|
|
TrieDirtyCache int
|
|
TrieTimeout time.Duration
|
|
Preimages bool
|
|
FilterLogCacheSize int
|
|
Miner miner.Config
|
|
LogQueryLimit int
|
|
TxPool legacypool.Config
|
|
GPO gasprice.Config
|
|
EnablePreimageRecording bool
|
|
VMTrace string
|
|
VMTraceJsonConfig string
|
|
RPCGasCap uint64
|
|
RPCEVMTimeout time.Duration
|
|
RPCTxFeeCap float64
|
|
RangeLimit uint64 `toml:",omitempty"`
|
|
}
|
|
var enc Config
|
|
enc.Genesis = c.Genesis
|
|
enc.NetworkId = c.NetworkId
|
|
enc.SyncMode = c.SyncMode
|
|
enc.NoPruning = c.NoPruning
|
|
enc.Prefetch = c.Prefetch
|
|
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
|
|
enc.TrieDirtyCache = c.TrieDirtyCache
|
|
enc.TrieTimeout = c.TrieTimeout
|
|
enc.Preimages = c.Preimages
|
|
enc.FilterLogCacheSize = c.FilterLogCacheSize
|
|
enc.Miner = c.Miner
|
|
enc.LogQueryLimit = c.LogQueryLimit
|
|
enc.TxPool = c.TxPool
|
|
enc.GPO = c.GPO
|
|
enc.EnablePreimageRecording = c.EnablePreimageRecording
|
|
enc.VMTrace = c.VMTrace
|
|
enc.VMTraceJsonConfig = c.VMTraceJsonConfig
|
|
enc.RPCGasCap = c.RPCGasCap
|
|
enc.RPCEVMTimeout = c.RPCEVMTimeout
|
|
enc.RPCTxFeeCap = c.RPCTxFeeCap
|
|
enc.RangeLimit = c.RangeLimit
|
|
return &enc, nil
|
|
}
|
|
|
|
// UnmarshalTOML unmarshals from TOML.
|
|
func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
|
|
type Config struct {
|
|
Genesis *core.Genesis `toml:",omitempty"`
|
|
NetworkId *uint64
|
|
SyncMode *downloader.SyncMode
|
|
NoPruning *bool
|
|
Prefetch *bool
|
|
LightServ *int `toml:",omitempty"`
|
|
LightPeers *int `toml:",omitempty"`
|
|
SkipBcVersionCheck *bool `toml:"-"`
|
|
DeleteAllBadBlocks *bool `toml:"-"`
|
|
DatabaseHandles *int `toml:"-"`
|
|
DatabaseCache *int
|
|
TrieCleanCache *int
|
|
TrieDirtyCache *int
|
|
TrieTimeout *time.Duration
|
|
Preimages *bool
|
|
FilterLogCacheSize *int
|
|
Miner *miner.Config
|
|
LogQueryLimit *int
|
|
TxPool *legacypool.Config
|
|
GPO *gasprice.Config
|
|
EnablePreimageRecording *bool
|
|
VMTrace *string
|
|
VMTraceJsonConfig *string
|
|
RPCGasCap *uint64
|
|
RPCEVMTimeout *time.Duration
|
|
RPCTxFeeCap *float64
|
|
RangeLimit *uint64 `toml:",omitempty"`
|
|
}
|
|
var dec Config
|
|
if err := unmarshal(&dec); err != nil {
|
|
return err
|
|
}
|
|
if dec.Genesis != nil {
|
|
c.Genesis = dec.Genesis
|
|
}
|
|
if dec.NetworkId != nil {
|
|
c.NetworkId = *dec.NetworkId
|
|
}
|
|
if dec.SyncMode != nil {
|
|
c.SyncMode = *dec.SyncMode
|
|
}
|
|
if dec.NoPruning != nil {
|
|
c.NoPruning = *dec.NoPruning
|
|
}
|
|
if dec.Prefetch != nil {
|
|
c.Prefetch = *dec.Prefetch
|
|
}
|
|
if dec.LightServ != nil {
|
|
c.LightServ = *dec.LightServ
|
|
}
|
|
if dec.LightPeers != nil {
|
|
c.LightPeers = *dec.LightPeers
|
|
}
|
|
if dec.SkipBcVersionCheck != nil {
|
|
c.SkipBcVersionCheck = *dec.SkipBcVersionCheck
|
|
}
|
|
if dec.DeleteAllBadBlocks != nil {
|
|
c.DeleteAllBadBlocks = *dec.DeleteAllBadBlocks
|
|
}
|
|
if dec.DatabaseHandles != nil {
|
|
c.DatabaseHandles = *dec.DatabaseHandles
|
|
}
|
|
if dec.DatabaseCache != nil {
|
|
c.DatabaseCache = *dec.DatabaseCache
|
|
}
|
|
if dec.TrieCleanCache != nil {
|
|
c.TrieCleanCache = *dec.TrieCleanCache
|
|
}
|
|
if dec.TrieDirtyCache != nil {
|
|
c.TrieDirtyCache = *dec.TrieDirtyCache
|
|
}
|
|
if dec.TrieTimeout != nil {
|
|
c.TrieTimeout = *dec.TrieTimeout
|
|
}
|
|
if dec.Preimages != nil {
|
|
c.Preimages = *dec.Preimages
|
|
}
|
|
if dec.FilterLogCacheSize != nil {
|
|
c.FilterLogCacheSize = *dec.FilterLogCacheSize
|
|
}
|
|
if dec.Miner != nil {
|
|
c.Miner = *dec.Miner
|
|
}
|
|
if dec.LogQueryLimit != nil {
|
|
c.LogQueryLimit = *dec.LogQueryLimit
|
|
}
|
|
if dec.TxPool != nil {
|
|
c.TxPool = *dec.TxPool
|
|
}
|
|
if dec.GPO != nil {
|
|
c.GPO = *dec.GPO
|
|
}
|
|
if dec.EnablePreimageRecording != nil {
|
|
c.EnablePreimageRecording = *dec.EnablePreimageRecording
|
|
}
|
|
if dec.VMTrace != nil {
|
|
c.VMTrace = *dec.VMTrace
|
|
}
|
|
if dec.VMTraceJsonConfig != nil {
|
|
c.VMTraceJsonConfig = *dec.VMTraceJsonConfig
|
|
}
|
|
if dec.RPCGasCap != nil {
|
|
c.RPCGasCap = *dec.RPCGasCap
|
|
}
|
|
if dec.RPCEVMTimeout != nil {
|
|
c.RPCEVMTimeout = *dec.RPCEVMTimeout
|
|
}
|
|
if dec.RPCTxFeeCap != nil {
|
|
c.RPCTxFeeCap = *dec.RPCTxFeeCap
|
|
}
|
|
if dec.RangeLimit != nil {
|
|
c.RangeLimit = *dec.RangeLimit
|
|
}
|
|
return nil
|
|
}
|