From 054412e33528e53f6deae940c870217b614707b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 24 Sep 2018 15:57:49 +0300 Subject: all: clean up and proerly abstract database access --- cmd/utils/cmd.go | 4 ++-- cmd/utils/flags.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/utils') diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index f23aa5775..74a8c7f39 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -238,7 +238,7 @@ func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, las } // ImportPreimages imports a batch of exported hash preimages into the database. -func ImportPreimages(db *ethdb.LDBDatabase, fn string) error { +func ImportPreimages(db ethdb.Database, fn string) error { log.Info("Importing preimages", "file", fn) // Open the file handle and potentially unwrap the gzip stream @@ -285,7 +285,7 @@ func ImportPreimages(db *ethdb.LDBDatabase, fn string) error { // ExportPreimages exports all known hash preimages into the specified file, // truncating any data already present in the file. -func ExportPreimages(db *ethdb.LDBDatabase, fn string) error { +func ExportPreimages(db ethdb.Database, fn string) error { log.Info("Exporting preimages", "file", fn) // Open the file handle and potentially wrap with a gzip stream diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 4db59097d..deb6df364 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1548,7 +1548,7 @@ func MakeChainDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database { if ctx.GlobalString(SyncModeFlag.Name) == "light" { name = "lightchaindata" } - chainDb, err := stack.OpenDatabase(name, cache, handles) + chainDb, err := stack.OpenDatabase(name, cache, handles, "") if err != nil { Fatalf("Could not open database: %v", err) } -- cgit v1.2.3