aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-17 19:24:51 +0800
committerobscuren <geffobscura@gmail.com>2015-02-17 19:24:58 +0800
commit8135752a32837748e6d4a986912131736b1a0aa0 (patch)
tree0ad3b6abab8a4b0c013844f93ca665526d2a567a /miner/worker.go
parent164de5e22be39ba2bdc58f84f72572252634e7e1 (diff)
downloaddexon-8135752a32837748e6d4a986912131736b1a0aa0.tar
dexon-8135752a32837748e6d4a986912131736b1a0aa0.tar.gz
dexon-8135752a32837748e6d4a986912131736b1a0aa0.tar.bz2
dexon-8135752a32837748e6d4a986912131736b1a0aa0.tar.lz
dexon-8135752a32837748e6d4a986912131736b1a0aa0.tar.xz
dexon-8135752a32837748e6d4a986912131736b1a0aa0.tar.zst
dexon-8135752a32837748e6d4a986912131736b1a0aa0.zip
"centralised" mining to backend. Closes #323
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 2b64f3210..47b462e53 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -8,7 +8,6 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/pow"
@@ -25,7 +24,7 @@ type environment struct {
uncles *set.Set
}
-func env(block *types.Block, eth *eth.Ethereum) *environment {
+func env(block *types.Block, eth core.Backend) *environment {
state := state.New(block.Root(), eth.Db())
env := &environment{
totalUsedGas: new(big.Int),
@@ -63,7 +62,7 @@ type worker struct {
quit chan struct{}
pow pow.PoW
- eth *eth.Ethereum
+ eth core.Backend
chain *core.ChainManager
proc *core.BlockProcessor
coinbase []byte
@@ -73,7 +72,7 @@ type worker struct {
mining bool
}
-func newWorker(coinbase []byte, eth *eth.Ethereum) *worker {
+func newWorker(coinbase []byte, eth core.Backend) *worker {
return &worker{
eth: eth,
mux: eth.EventMux(),