diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-07 01:57:39 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-08 04:29:02 +0800 |
commit | a23478c0be94e1e727a64d20341b8d6f98d7f0a0 (patch) | |
tree | 27020e2617acb8881332cac998965acdee6c2eb9 /miner | |
parent | d7580f21f65beaf896bfc004cf13d28ed87f2ae3 (diff) | |
download | dexon-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.gz dexon-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.zst dexon-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.zip |
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(), |