aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-03-07 16:21:40 +0800
committerGitHub <noreply@github.com>2019-03-07 16:21:40 +0800
commit72b21db2d31d77d956c09353457a0c2db45249b0 (patch)
treec0c750bfbbc5b5d8e9622847b676c1f4d99f4020 /cmd/utils
parentf2d63103541ee3746ff0834e7c69d188af3572d2 (diff)
parent054412e33528e53f6deae940c870217b614707b9 (diff)
downloadgo-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.gz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.bz2
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.lz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.xz
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.tar.zst
go-tangerine-72b21db2d31d77d956c09353457a0c2db45249b0.zip
Merge pull request #19021 from karalabe/database-cleanup
all: clean up and properly abstract database accesses
Diffstat (limited to 'cmd/utils')
-rw-r--r--cmd/utils/cmd.go4
-rw-r--r--cmd/utils/flags.go2
2 files changed, 3 insertions, 3 deletions
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)
}