aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-04 17:28:02 +0800
committerobscuren <geffobscura@gmail.com>2014-12-04 17:28:02 +0800
commit9008b155d3c8d2a32c4c8945f1174243d48d4e90 (patch)
treea55140b7d4802a0db14cbc265b8ca21d44d6f10a /miner
parentb6cb5272de96185b424d5c6c4a817d99f536d29b (diff)
downloadgo-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar.gz
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar.bz2
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar.lz
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar.xz
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.tar.zst
go-tangerine-9008b155d3c8d2a32c4c8945f1174243d48d4e90.zip
Renamed `chain` => `core`
Diffstat (limited to 'miner')
-rw-r--r--miner/miner.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/miner/miner.go b/miner/miner.go
index c39de18e3..589144c0c 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -30,8 +30,8 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/ethutil"
- "github.com/ethereum/go-ethereum/chain"
- "github.com/ethereum/go-ethereum/chain/types"
+ "github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/wire"
@@ -59,7 +59,7 @@ type Miner struct {
localTxs map[int]*LocalTx
localTxId int
- pow chain.PoW
+ pow core.PoW
quitCh chan struct{}
powQuitCh chan struct{}
@@ -74,7 +74,7 @@ func New(coinbase []byte, eth *eth.Ethereum) *Miner {
return &Miner{
eth: eth,
powQuitCh: make(chan struct{}),
- pow: &chain.EasyPow{},
+ pow: &core.EasyPow{},
mining: false,
localTxs: make(map[int]*LocalTx),
MinAcceptedGasPrice: big.NewInt(10000000000000),
@@ -82,7 +82,7 @@ func New(coinbase []byte, eth *eth.Ethereum) *Miner {
}
}
-func (self *Miner) GetPow() chain.PoW {
+func (self *Miner) GetPow() core.PoW {
return self.pow
}
@@ -116,7 +116,7 @@ func (self *Miner) Start() {
self.powQuitCh = make(chan struct{})
mux := self.eth.EventMux()
- self.events = mux.Subscribe(chain.NewBlockEvent{}, chain.TxPreEvent{}, &LocalTx{})
+ self.events = mux.Subscribe(core.NewBlockEvent{}, core.TxPreEvent{}, &LocalTx{})
go self.update()
go self.mine()
@@ -147,7 +147,7 @@ out:
select {
case event := <-self.events.Chan():
switch event := event.(type) {
- case chain.NewBlockEvent:
+ case core.NewBlockEvent:
block := event.Block
if self.eth.ChainManager().HasBlock(block.Hash()) {
self.reset()
@@ -156,7 +156,7 @@ out:
} else if true {
// do uncle stuff
}
- case chain.TxPreEvent, *LocalTx:
+ case core.TxPreEvent, *LocalTx:
self.reset()
go self.mine()
}