From c7e7778f2a7d80fa12643db546db98fa70f2e384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 22 Jul 2015 13:46:20 +0300 Subject: cmd, core, eth, ethdb: cache flag to allocate memory for db internal use --- eth/backend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'eth') 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 { -- cgit v1.2.3