cmd/geth: Flush instead of close. This solves a nil ptr error

pull/1113/head
obscuren 10 years ago
parent b2f2806055
commit 222249e622
  1. 12
      cmd/geth/main.go

@ -533,9 +533,9 @@ func importchain(ctx *cli.Context) {
} }
// force database flush // force database flush
ethereum.BlockDb().Close() ethereum.BlockDb().Flush()
ethereum.StateDb().Close() ethereum.StateDb().Flush()
ethereum.ExtraDb().Close() ethereum.ExtraDb().Flush()
fmt.Printf("Import done in %v", time.Since(start)) fmt.Printf("Import done in %v", time.Since(start))
@ -630,9 +630,9 @@ func upgradeDb(ctx *cli.Context) {
} }
// force database flush // force database flush
ethereum.BlockDb().Close() ethereum.BlockDb().Flush()
ethereum.StateDb().Close() ethereum.StateDb().Flush()
ethereum.ExtraDb().Close() ethereum.ExtraDb().Flush()
os.Remove(exportFile) os.Remove(exportFile)

Loading…
Cancel
Save