aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-06 21:02:16 +0800
committerFelix Lange <fjl@twurst.com>2015-03-06 21:02:16 +0800
commite64f727529287b7414af6d1f482ea5f318cbd2eb (patch)
treef1939dffc5973597e6da17ef60ad2044af7f4340 /eth
parenta91bf014295bfaebee976f9e0e994e8a83e8e356 (diff)
parentde86403f330e68df8fc4aee00df98374b7842d0d (diff)
downloaddexon-e64f727529287b7414af6d1f482ea5f318cbd2eb.tar.gz
dexon-e64f727529287b7414af6d1f482ea5f318cbd2eb.tar.zst
dexon-e64f727529287b7414af6d1f482ea5f318cbd2eb.zip
Merge pull request #433 from fjl/newcli
Improved CLI
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 4e021a901..1c711a775 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -130,13 +130,15 @@ type Ethereum struct {
logger logger.LogSystem
- Mining bool
+ Mining bool
+ DataDir string
}
func New(config *Config) (*Ethereum, error) {
// Boostrap database
ethlogger := logger.New(config.DataDir, config.LogFile, config.LogLevel, config.LogFormat)
- db, err := ethdb.NewLDBDatabase("blockchain")
+
+ db, err := ethdb.NewLDBDatabase(path.Join(config.DataDir, "blockchain"))
if err != nil {
return nil, err
}
@@ -171,6 +173,7 @@ func New(config *Config) (*Ethereum, error) {
keyManager: keyManager,
eventMux: &event.TypeMux{},
logger: ethlogger,
+ DataDir: config.DataDir,
}
eth.chainManager = core.NewChainManager(db, eth.EventMux())