ttd from command-line takes precedence over ttd from config-file
This commit is contained in:
parent
2c2bcae00e
commit
d1dd5d5cad
|
@ -316,7 +316,8 @@ type
|
||||||
name: "discovery" .}: DiscoveryType
|
name: "discovery" .}: DiscoveryType
|
||||||
|
|
||||||
terminalTotalDifficulty* {.
|
terminalTotalDifficulty* {.
|
||||||
desc: "The terminal total difficulty of the eth2 merge transition block"
|
desc: "The terminal total difficulty of the eth2 merge transition block." &
|
||||||
|
" It takes precedence over terminalTotalDifficulty in config file."
|
||||||
name: "terminal-total-difficulty" .}: Option[UInt256]
|
name: "terminal-total-difficulty" .}: Option[UInt256]
|
||||||
|
|
||||||
engineApiEnabled* {.
|
engineApiEnabled* {.
|
||||||
|
@ -674,6 +675,11 @@ proc makeConfig*(cmdLine = commandLineParams()): NimbusConf =
|
||||||
if result.customNetwork.isNone:
|
if result.customNetwork.isNone:
|
||||||
result.networkParams = networkParams(result.networkId)
|
result.networkParams = networkParams(result.networkId)
|
||||||
|
|
||||||
|
# ttd from cli takes precedence over ttd from config-file
|
||||||
|
if result.terminalTotalDifficulty.isSome:
|
||||||
|
result.networkParams.config.terminalTotalDifficulty =
|
||||||
|
result.terminalTotalDifficulty
|
||||||
|
|
||||||
if result.cmd == noCommand:
|
if result.cmd == noCommand:
|
||||||
if result.udpPort == Port(0):
|
if result.udpPort == Port(0):
|
||||||
# if udpPort not set in cli, then
|
# if udpPort not set in cli, then
|
||||||
|
|
Loading…
Reference in New Issue