diff options
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miner/worker.go b/miner/worker.go index 29992b327..21a0522e8 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -30,7 +30,7 @@ type environment struct { } func env(block *types.Block, eth core.Backend) *environment { - state := state.New(block.Root(), eth.Db()) + state := state.New(block.Root(), eth.StateDb()) env := &environment{ totalUsedGas: new(big.Int), state: state, @@ -116,7 +116,7 @@ func (self *worker) register(agent Agent) { } func (self *worker) update() { - events := self.mux.Subscribe(core.ChainEvent{}, core.NewMinedBlockEvent{}) + events := self.mux.Subscribe(core.ChainHeadEvent{}, core.NewMinedBlockEvent{}) timer := time.NewTicker(2 * time.Second) @@ -125,7 +125,7 @@ out: select { case event := <-events.Chan(): switch ev := event.(type) { - case core.ChainEvent: + case core.ChainHeadEvent: if self.current.block != ev.Block { self.commitNewWork() } |