diff options
Diffstat (limited to 'node')
-rw-r--r-- | node/service.go | 4 | ||||
-rw-r--r-- | node/service_test.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/node/service.go b/node/service.go index 26e9f1624..77b2ddc92 100644 --- a/node/service.go +++ b/node/service.go @@ -38,11 +38,11 @@ type ServiceContext struct { // OpenDatabase opens an existing database with the given name (or creates one // if no previous can be found) from within the node's data directory. If the // node is an ephemeral one, a memory database is returned. -func (ctx *ServiceContext) OpenDatabase(name string, cache int) (ethdb.Database, error) { +func (ctx *ServiceContext) OpenDatabase(name string, cache int, handles int) (ethdb.Database, error) { if ctx.datadir == "" { return ethdb.NewMemDatabase() } - return ethdb.NewLDBDatabase(filepath.Join(ctx.datadir, name), cache) + return ethdb.NewLDBDatabase(filepath.Join(ctx.datadir, name), cache, handles) } // Service retrieves a currently running service registered of a specific type. diff --git a/node/service_test.go b/node/service_test.go index cfe7fe5dc..7bd94a52e 100644 --- a/node/service_test.go +++ b/node/service_test.go @@ -39,7 +39,7 @@ func TestContextDatabases(t *testing.T) { } // Request the opening/creation of a database and ensure it persists to disk ctx := &ServiceContext{datadir: dir} - db, err := ctx.OpenDatabase("persistent", 0) + db, err := ctx.OpenDatabase("persistent", 0, 0) if err != nil { t.Fatalf("failed to open persistent database: %v", err) } @@ -50,7 +50,7 @@ func TestContextDatabases(t *testing.T) { } // Request th opening/creation of an ephemeral database and ensure it's not persisted ctx = &ServiceContext{datadir: ""} - db, err = ctx.OpenDatabase("ephemeral", 0) + db, err = ctx.OpenDatabase("ephemeral", 0, 0) if err != nil { t.Fatalf("failed to open ephemeral database: %v", err) } |