diff options
Diffstat (limited to 'node/node.go')
-rw-r--r-- | node/node.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/node/node.go b/node/node.go index 9227bf6bb..bd031bd0f 100644 --- a/node/node.go +++ b/node/node.go @@ -27,6 +27,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/internal/debug" @@ -601,11 +602,11 @@ func (n *Node) EventMux() *event.TypeMux { // OpenDatabase opens an existing database with the given name (or creates one if no // previous can be found) from within the node's instance directory. If the node is // ephemeral, a memory database is returned. -func (n *Node) OpenDatabase(name string, cache, handles int) (ethdb.Database, error) { +func (n *Node) OpenDatabase(name string, cache, handles int, namespace string) (ethdb.Database, error) { if n.config.DataDir == "" { - return ethdb.NewMemDatabase(), nil + return rawdb.NewMemoryDatabase(), nil } - return ethdb.NewLDBDatabase(n.config.ResolvePath(name), cache, handles) + return rawdb.NewLevelDBDatabase(n.config.ResolvePath(name), cache, handles, namespace) } // ResolvePath returns the absolute path of a resource in the instance directory. |