aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-07 01:57:39 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-08 04:29:02 +0800
commita23478c0be94e1e727a64d20341b8d6f98d7f0a0 (patch)
tree27020e2617acb8881332cac998965acdee6c2eb9 /miner
parentd7580f21f65beaf896bfc004cf13d28ed87f2ae3 (diff)
downloadgo-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.gz
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.bz2
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.lz
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.xz
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.tar.zst
go-tangerine-a23478c0be94e1e727a64d20341b8d6f98d7f0a0.zip
core, eth, trie, xeth: merged state, chain, extra databases in one
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go10
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(),