-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
cmd/geth: fix import / export issues related to DB unavailability #21414
Conversation
Can confirm it fixes the bug that was reported (haven't looked at the code yet) |
Some more locations to apply the same fix for:
|
Looking at the code and fix, it's not quite clear to me why this fails -- since |
Yes I noticed that too, made a separate PR for those here: #21415 The explanation for this issue is that, when |
Documenting this in the methods is a good idea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cmd/geth/chaincmd.go
Outdated
@@ -278,7 +278,8 @@ func importChain(ctx *cli.Context) error { | |||
utils.SetupMetrics(ctx) | |||
// Start system runtime metrics collection | |||
go metrics.CollectProcessMetrics(3 * time.Second) | |||
stack, _ := makeFullNode(ctx) | |||
// Make the bare-minimum node to avoid unnecessary service start-up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to put a documentation comment on the actual function definition instead of documenting the behavior of makeConfigNode at individual call sites.
// makeConfigNode loads geth configuration and creates a blank node instance.
// makeFullNode loads geth configuration and creates the Ethereum backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
…hereum#21414) * should fix import / export issues related to DB unavailability * document reason for makeConfigNode * fix comment * comment consistency * remove comments * lint
Fixes #21412