Skip to content

Commit 222249e

Browse files
committed
cmd/geth: Flush instead of close. This solves a nil ptr error
1 parent b2f2806 commit 222249e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cmd/geth/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,9 @@ func importchain(ctx *cli.Context) {
533533
}
534534

535535
// force database flush
536-
ethereum.BlockDb().Close()
537-
ethereum.StateDb().Close()
538-
ethereum.ExtraDb().Close()
536+
ethereum.BlockDb().Flush()
537+
ethereum.StateDb().Flush()
538+
ethereum.ExtraDb().Flush()
539539

540540
fmt.Printf("Import done in %v", time.Since(start))
541541

@@ -630,9 +630,9 @@ func upgradeDb(ctx *cli.Context) {
630630
}
631631

632632
// force database flush
633-
ethereum.BlockDb().Close()
634-
ethereum.StateDb().Close()
635-
ethereum.ExtraDb().Close()
633+
ethereum.BlockDb().Flush()
634+
ethereum.StateDb().Flush()
635+
ethereum.ExtraDb().Flush()
636636

637637
os.Remove(exportFile)
638638

0 commit comments

Comments
 (0)