aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-07 20:17:48 +0800
committerobscuren <geffobscura@gmail.com>2015-01-07 20:17:48 +0800
commitfed3e6a808921fb8274b50043c5c39a24a1bbccf (patch)
treed632e95cfce78bd9a99a52bf7f30ee3ff980dfd3 /eth
parent032ab665299d75bffc25260e8fa477ace19db06a (diff)
downloadgo-tangerine-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.gz
go-tangerine-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.zst
go-tangerine-fed3e6a808921fb8274b50043c5c39a24a1bbccf.zip
Refactored ethutil.Config.Db out
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/backend.go b/eth/backend.go
index a6ff52748..02d3dc942 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -81,7 +81,7 @@ type Ethereum struct {
func New(config *Config) (*Ethereum, error) {
// Boostrap database
logger := ethlogger.New(config.DataDir, config.LogFile, config.LogLevel)
- db, err := ethdb.NewLDBDatabase("database")
+ db, err := ethdb.NewLDBDatabase("blockchain")
if err != nil {
return nil, err
}
@@ -110,7 +110,7 @@ func New(config *Config) (*Ethereum, error) {
clientId := p2p.NewSimpleClientIdentity(config.Name, config.Version, config.Identifier, keyManager.PublicKey())
saveProtocolVersion(db)
- ethutil.Config.Db = db
+ //ethutil.Config.Db = db
eth := &Ethereum{
shutdownChan: make(chan bool),
@@ -123,9 +123,9 @@ func New(config *Config) (*Ethereum, error) {
logger: logger,
}
- eth.chainManager = core.NewChainManager(eth.EventMux())
+ eth.chainManager = core.NewChainManager(db, eth.EventMux())
eth.txPool = core.NewTxPool(eth.EventMux())
- eth.blockProcessor = core.NewBlockProcessor(eth.txPool, eth.chainManager, eth.EventMux())
+ eth.blockProcessor = core.NewBlockProcessor(db, eth.txPool, eth.chainManager, eth.EventMux())
eth.chainManager.SetProcessor(eth.blockProcessor)
eth.whisper = whisper.New()