Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more command flags #312

Merged
merged 5 commits into from
May 20, 2022
Merged

Conversation

irisZhangCB
Copy link
Contributor

@irisZhangCB irisZhangCB commented May 11, 2022

Fixes # .

Motivation

Added node-url flag to check:data and check:construction, so that node url can be set via CLI, overriding the value in configuration file.

Added start and end index as flags to check:data as well.

Solution

Open questions

@irisZhangCB irisZhangCB marked this pull request as ready for review May 11, 2022 21:45
@@ -76,6 +77,7 @@ func runCheckConstructionCmd(_ *cobra.Command, _ []string) error {
fetcherOpts = append(fetcherOpts, fetcher.WithForceRetry())
}

log.Println("node url: ", Config.OnlineURL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this

cmd/root.go Outdated
@@ -48,6 +48,8 @@ var (
cpuProfile string
memProfile string
blockProfile string
onlineUrl string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix ident

@irisZhangCB irisZhangCB changed the title Add node url into command flag Add more command flags May 17, 2022
@irisZhangCB irisZhangCB requested a review from xiaying-peng May 20, 2022 16:55
// Override start and end syncing index in configuration file when it's explicitly set via CLI
if startIndex != -1 {
Config.Data.StartIndex = &startIndex
Config.Data.InitialBalanceFetchDisabled = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comments why we toggle the flag.

@irisZhangCB irisZhangCB merged commit 88cd3ca into coinbase:master May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants