cmd, eth: clean up miner startup API, drop noop config field

This commit is contained in:
Péter Szilágyi
2018-08-23 13:02:36 +03:00
parent f34f361ca6
commit 92381ee009
6 changed files with 75 additions and 80 deletions

View File

@ -31,7 +31,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
TrieCache int
TrieTimeout time.Duration
Etherbase common.Address `toml:",omitempty"`
MinerThreads int `toml:",omitempty"`
MinerNotify []string `toml:",omitempty"`
MinerExtraData hexutil.Bytes `toml:",omitempty"`
MinerGasPrice *big.Int
@ -55,7 +54,6 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.TrieCache = c.TrieCache
enc.TrieTimeout = c.TrieTimeout
enc.Etherbase = c.Etherbase
enc.MinerThreads = c.MinerThreads
enc.MinerNotify = c.MinerNotify
enc.MinerExtraData = c.MinerExtraData
enc.MinerGasPrice = c.MinerGasPrice
@ -134,9 +132,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.Etherbase != nil {
c.Etherbase = *dec.Etherbase
}
if dec.MinerThreads != nil {
c.MinerThreads = *dec.MinerThreads
}
if dec.MinerNotify != nil {
c.MinerNotify = dec.MinerNotify
}