Skip to content

improvement: use default value if the option is not configure in config.toml #2986

@zzzckck

Description

@zzzckck

System information

Geth version: v1.5.7
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)

take DelayLeftOver for example:
it has default value: 50ms
https://github.com/bnb-chain/bsc/blob/v1.5.7/miner/minerconfig/config.go#L56

if a validator have the following setup in its config.toml

[Eth.Miner]
GasCeil = 140000000
GasFloor = 140000000
GasPrice = 1000000000
Recommit = 10000000000
VoteEnable = true

obviously, DelayLeftOver is not set.

Expected behaviour

  • we expect it use the default 50ms

Actual behaviour

  • but it is 0 actually

Steps to reproduce the behaviour

NA, mark: there are lots of such kind of cases, need to be improved.

Backtrace

NA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions