cmd/geth: fix import / export issues related to DB unavailability (#21414)

* should fix import / export issues related to DB unavailability

* document reason for makeConfigNode

* fix comment

* comment consistency

* remove comments

* lint
pull/21419/head
rene 4 years ago committed by GitHub
parent 2de37f28e0
commit 4a04127ce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      cmd/geth/chaincmd.go

@ -278,7 +278,8 @@ func importChain(ctx *cli.Context) error {
utils.SetupMetrics(ctx) utils.SetupMetrics(ctx)
// Start system runtime metrics collection // Start system runtime metrics collection
go metrics.CollectProcessMetrics(3 * time.Second) go metrics.CollectProcessMetrics(3 * time.Second)
stack, _ := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close() defer stack.Close()
chain, db := utils.MakeChain(ctx, stack, false) chain, db := utils.MakeChain(ctx, stack, false)
@ -372,7 +373,8 @@ func exportChain(ctx *cli.Context) error {
if len(ctx.Args()) < 1 { if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.") utils.Fatalf("This command requires an argument.")
} }
stack, _ := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close() defer stack.Close()
chain, _ := utils.MakeChain(ctx, stack, true) chain, _ := utils.MakeChain(ctx, stack, true)

Loading…
Cancel
Save