diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-07 20:17:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-07 20:17:48 +0800 |
commit | fed3e6a808921fb8274b50043c5c39a24a1bbccf (patch) | |
tree | d632e95cfce78bd9a99a52bf7f30ee3ff980dfd3 /eth | |
parent | 032ab665299d75bffc25260e8fa477ace19db06a (diff) | |
download | dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.gz dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.tar.zst dexon-fed3e6a808921fb8274b50043c5c39a24a1bbccf.zip |
Refactored ethutil.Config.Db out
Diffstat (limited to 'eth')
-rw-r--r-- | eth/backend.go | 8 |
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() |