Move remote mining agent to XEth
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user