Add option to disable ntp sync to statusd (#1031)

This commit is contained in:
Adrià Cidre 2018-06-14 10:56:01 +02:00 committed by GitHub
parent 6173d3ee06
commit 765fb69d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -30,7 +30,7 @@ jobs:
script:
# Sync the chain first. It will time out after 30 minutes. Used network: Rinkeby.
- 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
cache:
directories:

View file

@ -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")
ntpSyncEnabled = flag.Bool("ntp", true, "Enable/disable whisper NTP synchronization")
// Topics that will be search and registered by discovery v5.
searchTopics = topics.TopicLimitsFlag{}
registerTopics = topics.TopicFlag{}
@ -250,6 +252,8 @@ func makeNodeConfig() (*params.NodeConfig, error) {
nodeConfig.RequireTopics = map[discv5.Topic]params.Limits(searchTopics)
nodeConfig.RegisterTopics = []discv5.Topic(registerTopics)
nodeConfig.WhisperConfig.EnableNTPSync = *ntpSyncEnabled
// Even if standalone is true and discovery is disabled,
// it's possible to use bootnodes.
if *bootnodes != "" {