diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-09 20:16:37 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-09 20:16:37 +0800 |
commit | 2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a (patch) | |
tree | e3e7d013e2ccae939df7dd1d8aa7dcb3802fadd7 /miner | |
parent | 07cb8092e7a41e80224dc63691146e8714f94ebf (diff) | |
parent | a23478c0be94e1e727a64d20341b8d6f98d7f0a0 (diff) | |
download | dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar.gz dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar.bz2 dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar.lz dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar.xz dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.tar.zst dexon-2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a.zip |
Merge pull request #1604 from obscuren/db-merge
core, eth, trie, xeth: merged state, chain, extra databases in one
Diffstat (limited to 'miner')
-rw-r--r-- | miner/worker.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miner/worker.go b/miner/worker.go index 535ce5144..df3681470 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -100,7 +100,7 @@ type worker struct { eth core.Backend chain *core.ChainManager proc *core.BlockProcessor - extraDb common.Database + chainDb common.Database coinbase common.Address gasPrice *big.Int @@ -126,7 +126,7 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker { worker := &worker{ eth: eth, mux: eth.EventMux(), - extraDb: eth.ExtraDb(), + chainDb: eth.ChainDb(), recv: make(chan *Result, resultQueueSize), gasPrice: new(big.Int), chain: eth.ChainManager(), @@ -291,9 +291,9 @@ func (self *worker) wait() { // check if canon block and write transactions if stat == core.CanonStatTy { // This puts transactions in a extra db for rpc - core.PutTransactions(self.extraDb, block, block.Transactions()) + core.PutTransactions(self.chainDb, block, block.Transactions()) // store the receipts - core.PutReceipts(self.extraDb, work.receipts) + core.PutReceipts(self.chainDb, work.receipts) } // broadcast before waiting for validation @@ -344,7 +344,7 @@ func (self *worker) push(work *Work) { // makeCurrent creates a new environment for the current cycle. func (self *worker) makeCurrent(parent *types.Block, header *types.Header) { - state := state.New(parent.Root(), self.eth.StateDb()) + state := state.New(parent.Root(), self.eth.ChainDb()) work := &Work{ state: state, ancestors: set.New(), |