mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 19:40:36 +00:00
miner: register newly created remote agent in the API
This commit is contained in:
parent
6005dcef5b
commit
9aa7158057
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user