aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-23 16:17:18 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-23 16:17:18 +0800
commitb403b9e4c398a285c0e307771761b29bab47adb9 (patch)
treeb9991d8a9ab71e84a1350e0769ec9ae59ecd3cc0 /eth
parent26a269ea09667f7e49b89f96bb5eaee66c0d10f8 (diff)
parentc7e7778f2a7d80fa12643db546db98fa70f2e384 (diff)
downloaddexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar.gz
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar.bz2
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar.lz
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar.xz
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.tar.zst
dexon-b403b9e4c398a285c0e307771761b29bab47adb9.zip
Merge pull request #1508 from karalabe/database-caching
cmd, core, eth, ethdb: cache flag to allocate memory for db internal use
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go
index e7250c019..4906f78ef 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -80,6 +80,7 @@ type Config struct {
BlockChainVersion int
SkipBcVersionCheck bool // e.g. blockchain export
+ DatabaseCache int
DataDir string
LogFile string
@@ -261,7 +262,7 @@ func New(config *Config) (*Ethereum, error) {
newdb := config.NewDB
if newdb == nil {
- newdb = func(path string) (common.Database, error) { return ethdb.NewLDBDatabase(path) }
+ newdb = func(path string) (common.Database, error) { return ethdb.NewLDBDatabase(path, config.DatabaseCache) }
}
blockDb, err := newdb(filepath.Join(config.DataDir, "blockchain"))
if err != nil {