Add option to disable ntp sync to statusd (#1031)
This commit is contained in:
parent
6173d3ee06
commit
765fb69d89
|
@ -30,7 +30,7 @@ jobs:
|
||||||
script:
|
script:
|
||||||
# Sync the chain first. It will time out after 30 minutes. Used network: Rinkeby.
|
# Sync the chain first. It will time out after 30 minutes. Used network: Rinkeby.
|
||||||
- make statusgo
|
- make statusgo
|
||||||
- ./build/bin/statusd -datadir=.ethereumtest/Rinkeby -les -networkid=4 -sync-and-exit=45 -log=WARN -standalone=false -discovery=false
|
- ./build/bin/statusd -datadir=.ethereumtest/Rinkeby -les -networkid=4 -sync-and-exit=45 -log=WARN -standalone=false -discovery=false -ntp=false
|
||||||
- make test-e2e networkid=4
|
- make test-e2e networkid=4
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
|
|
@ -79,6 +79,8 @@ var (
|
||||||
|
|
||||||
syncAndExit = flag.Int("sync-and-exit", -1, "Timeout in minutes for blockchain sync and exit, zero means no timeout unless sync is finished")
|
syncAndExit = flag.Int("sync-and-exit", -1, "Timeout in minutes for blockchain sync and exit, zero means no timeout unless sync is finished")
|
||||||
|
|
||||||
|
ntpSyncEnabled = flag.Bool("ntp", true, "Enable/disable whisper NTP synchronization")
|
||||||
|
|
||||||
// Topics that will be search and registered by discovery v5.
|
// Topics that will be search and registered by discovery v5.
|
||||||
searchTopics = topics.TopicLimitsFlag{}
|
searchTopics = topics.TopicLimitsFlag{}
|
||||||
registerTopics = topics.TopicFlag{}
|
registerTopics = topics.TopicFlag{}
|
||||||
|
@ -250,6 +252,8 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
||||||
nodeConfig.RequireTopics = map[discv5.Topic]params.Limits(searchTopics)
|
nodeConfig.RequireTopics = map[discv5.Topic]params.Limits(searchTopics)
|
||||||
nodeConfig.RegisterTopics = []discv5.Topic(registerTopics)
|
nodeConfig.RegisterTopics = []discv5.Topic(registerTopics)
|
||||||
|
|
||||||
|
nodeConfig.WhisperConfig.EnableNTPSync = *ntpSyncEnabled
|
||||||
|
|
||||||
// Even if standalone is true and discovery is disabled,
|
// Even if standalone is true and discovery is disabled,
|
||||||
// it's possible to use bootnodes.
|
// it's possible to use bootnodes.
|
||||||
if *bootnodes != "" {
|
if *bootnodes != "" {
|
||||||
|
|
Loading…
Reference in New Issue