miner: register newly created remote agent in the API
This commit is contained in:
1 parent
6005dcef5b
commit
9aa7158057
1 file changed
+4
-1
+4
-1
@@ -33,7 +33,10 @@ type PublicMinerAPI struct {
|
||||
|
||||
// NewPublicMinerAPI create a new PublicMinerAPI instance.
|
||||
func NewPublicMinerAPI(miner *Miner) *PublicMinerAPI {
|
||||
return &PublicMinerAPI{miner, NewRemoteAgent()}
|
||||
agent := NewRemoteAgent()
|
||||
miner.Register(agent)
|
||||
|
||||
return &PublicMinerAPI{miner, agent}
|
||||
}
|
||||
|
||||
// Mining returns an indication if this node is currently mining.
|
||||
|
||||
Reference in new issue
Block a user