aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-13 01:05:33 +0800
committerobscuren <geffobscura@gmail.com>2015-05-13 01:05:33 +0800
commit8e24378cc1acb074b56de75bf0baf6feb7927677 (patch)
tree71f866652de6b45da5ad4403b88f5def9a684e36 /ethdb
parent7d69679935ff8c04aebb60f27074f08c5e84ac95 (diff)
parent8fe01b4bfa28ad5a1fdde7f9837e8f982843389a (diff)
downloadgo-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.gz
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.bz2
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.lz
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.xz
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.tar.zst
go-tangerine-8e24378cc1acb074b56de75bf0baf6feb7927677.zip
Merge branch 'release/0.9.20'v0.9.20
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/database.go4
-rw-r--r--ethdb/database_test.go4
2 files changed, 4 insertions, 4 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
}
diff --git a/ethdb/database_test.go b/ethdb/database_test.go
index 3cead8bcd..a80976a9a 100644
--- a/ethdb/database_test.go
+++ b/ethdb/database_test.go
@@ -2,13 +2,13 @@ package ethdb
import (
"os"
- "path"
+ "path/filepath"
"github.com/ethereum/go-ethereum/common"
)
func newDb() *LDBDatabase {
- file := path.Join("/", "tmp", "ldbtesttmpfile")
+ file := filepath.Join("/", "tmp", "ldbtesttmpfile")
if common.FileExist(file) {
os.RemoveAll(file)
}