aboutsummaryrefslogtreecommitdiffstats
path: root/xeth/xeth.go
diff options
context:
space:
mode:
Diffstat (limited to 'xeth/xeth.go')
-rw-r--r--xeth/xeth.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go
index d3c3131d4..fba61230f 100644
--- a/xeth/xeth.go
+++ b/xeth/xeth.go
@@ -100,6 +100,9 @@ type XEth struct {
// regmut sync.Mutex
// register map[string][]*interface{} // TODO improve return type
+
+ // Miner agent
+ agent *Agent
}
// New creates an XEth that uses the given frontend.
@@ -117,7 +120,10 @@ func New(eth Backend, frontend Frontend) *XEth {
frontend: frontend,
logs: make(map[int]*logFilter),
messages: make(map[int]*whisperFilter),
+ agent: NewAgent(),
}
+ eth.Miner().Register(xeth.agent)
+
if frontend == nil {
xeth.frontend = dummyFrontend{}
}
@@ -164,6 +170,8 @@ func (self *XEth) stop() {
func (self *XEth) DefaultGas() *big.Int { return defaultGas }
func (self *XEth) DefaultGasPrice() *big.Int { return defaultGasPrice }
+func (self *XEth) RemoteMining() *Agent { return self.agent }
+
func (self *XEth) AtStateNum(num int64) *XEth {
chain := self.Backend().ChainManager()
var block *types.Block