mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
cmd/geth: Flush instead of close. This solves a nil ptr error
This commit is contained in:
parent
b2f2806055
commit
222249e622
@ -533,9 +533,9 @@ func importchain(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
// force database flush
|
||||
ethereum.BlockDb().Close()
|
||||
ethereum.StateDb().Close()
|
||||
ethereum.ExtraDb().Close()
|
||||
ethereum.BlockDb().Flush()
|
||||
ethereum.StateDb().Flush()
|
||||
ethereum.ExtraDb().Flush()
|
||||
|
||||
fmt.Printf("Import done in %v", time.Since(start))
|
||||
|
||||
@ -630,9 +630,9 @@ func upgradeDb(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
// force database flush
|
||||
ethereum.BlockDb().Close()
|
||||
ethereum.StateDb().Close()
|
||||
ethereum.ExtraDb().Close()
|
||||
ethereum.BlockDb().Flush()
|
||||
ethereum.StateDb().Flush()
|
||||
ethereum.ExtraDb().Flush()
|
||||
|
||||
os.Remove(exportFile)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user