diff options
author | Felix Lange <fjl@twurst.com> | 2016-08-16 02:14:05 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-17 23:39:04 +0800 |
commit | 3c09c5f12d21258865677cf565bb9d53a8098d3a (patch) | |
tree | 768b7f6f9df8fa7a572d80a04d94e5d31fe3580a /miner/worker.go | |
parent | 1a9e66915b415cb1ca2bc2680f8fb4ff1883787c (diff) | |
download | dexon-3c09c5f12d21258865677cf565bb9d53a8098d3a.tar.gz dexon-3c09c5f12d21258865677cf565bb9d53a8098d3a.tar.zst dexon-3c09c5f12d21258865677cf565bb9d53a8098d3a.zip |
core, miner: move Backend to miner
This ensures that package core doesn't depend on package accounts and
resolves an age-old TODO.
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go index dfda6d898..59406bf4e 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -60,7 +60,7 @@ type uint64RingBuffer struct { next int //where is the next insertion? assert 0 <= next < len(ints) } -// environment is the workers current environment and holds +// Work is the workers current environment and holds // all of the current state information type Work struct { config *core.ChainConfig @@ -105,7 +105,7 @@ type worker struct { recv chan *Result pow pow.PoW - eth core.Backend + eth Backend chain *core.BlockChain proc core.Validator chainDb ethdb.Database @@ -130,11 +130,11 @@ type worker struct { fullValidation bool } -func newWorker(config *core.ChainConfig, coinbase common.Address, eth core.Backend) *worker { +func newWorker(config *core.ChainConfig, coinbase common.Address, eth Backend, mux *event.TypeMux) *worker { worker := &worker{ config: config, eth: eth, - mux: eth.EventMux(), + mux: mux, chainDb: eth.ChainDb(), recv: make(chan *Result, resultQueueSize), gasPrice: new(big.Int), |