aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
authorAlexandre Van de Sande <alex.vandesande@ethdev.com>2015-02-17 19:29:10 +0800
committerAlexandre Van de Sande <alex.vandesande@ethdev.com>2015-02-17 19:29:10 +0800
commitabb9b7f46ff3b2ef0bb4f2e95f029591688768c4 (patch)
treec4088c788b3e86935a2b8fd2fbe157340476f091 /xeth/xeth.go
parentfbd5e4d5afeaff6c250a3a953b18476cdb4b86ae (diff)
parentc934222a8089b19587242a3b0bc71ea0aec1d5ef (diff)
downloadgo-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar.gz
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar.bz2
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar.lz
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar.xz
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.tar.zst
go-tangerine-abb9b7f46ff3b2ef0bb4f2e95f029591688768c4.zip
Merge branch 'develop' into ui
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index 75d83f80b..27435b956 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/logger"
+ "github.com/ethereum/go-ethereum/miner"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/whisper"
@@ -27,13 +28,13 @@ type Backend interface {
ChainManager() *core.ChainManager
TxPool() *core.TxPool
PeerCount() int
- IsMining() bool
IsListening() bool
Peers() []*p2p.Peer
KeyManager() *crypto.KeyManager
Db() ethutil.Database
EventMux() *event.TypeMux
Whisper() *whisper.Whisper
+ Miner() *miner.Miner
}
type XEth struct {
@@ -42,6 +43,7 @@ type XEth struct {
chainManager *core.ChainManager
state *State
whisper *Whisper
+ miner *miner.Miner
}
func New(eth Backend) *XEth {
@@ -50,15 +52,17 @@ func New(eth Backend) *XEth {
blockProcessor: eth.BlockProcessor(),
chainManager: eth.ChainManager(),
whisper: NewWhisper(eth.Whisper()),
+ miner: eth.Miner(),
}
xeth.state = NewState(xeth)
return xeth
}
-func (self *XEth) Backend() Backend { return self.eth }
-func (self *XEth) State() *State { return self.state }
-func (self *XEth) Whisper() *Whisper { return self.whisper }
+func (self *XEth) Backend() Backend { return self.eth }
+func (self *XEth) State() *State { return self.state }
+func (self *XEth) Whisper() *Whisper { return self.whisper }
+func (self *XEth) Miner() *miner.Miner { return self.miner }
func (self *XEth) BlockByHash(strHash string) *Block {
hash := fromHex(strHash)
@@ -96,7 +100,7 @@ func (self *XEth) PeerCount() int {
}
func (self *XEth) IsMining() bool {
- return self.eth.IsMining()
+ return self.miner.Mining()
}
func (self *XEth) IsListening() bool {