aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-12 17:28:33 +0800
committerobscuren <geffobscura@gmail.com>2015-05-12 17:28:55 +0800
commit13f8f65a58bc9a31c8900e12ae2c3ed10003486f (patch)
tree6e03c6cb52ac2e6838df370079c1a23424b23fa0 /ethdb
parent76215ca9f3c22b97d81b492026691a692cc2ce1a (diff)
downloaddexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar.gz
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar.bz2
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar.lz
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar.xz
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.tar.zst
dexon-13f8f65a58bc9a31c8900e12ae2c3ed10003486f.zip
eth, ethdb: lower the amount of open files & improve err messages for db
Closes #880
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/database.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethdb/database.go b/ethdb/database.go
index 15af02fdf..c351c024a 100644
--- a/ethdb/database.go
+++ b/ethdb/database.go
@@ -11,7 +11,7 @@ import (
"github.com/syndtr/goleveldb/leveldb/opt"
)
-const openFileLimit = 128
+var OpenFileLimit = 64
type LDBDatabase struct {
fn string
@@ -26,7 +26,7 @@ type LDBDatabase struct {
func NewLDBDatabase(file string) (*LDBDatabase, error) {
// Open the db
- db, err := leveldb.OpenFile(file, &opt.Options{OpenFilesCacheCapacity: openFileLimit})
+ db, err := leveldb.OpenFile(file, &opt.Options{OpenFilesCacheCapacity: OpenFileLimit})
if err != nil {
return nil, err
}