Skip to content

Commit 9aa7158

Browse files
committed
miner: register newly created remote agent in the API
1 parent 6005dce commit 9aa7158

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎miner/api.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ type PublicMinerAPI struct {
3333

3434
// NewPublicMinerAPI create a new PublicMinerAPI instance.
3535
func NewPublicMinerAPI(miner *Miner) *PublicMinerAPI {
36-
return &PublicMinerAPI{miner, NewRemoteAgent()}
36+
agent := NewRemoteAgent()
37+
miner.Register(agent)
38+
39+
return &PublicMinerAPI{miner, agent}
3740
}
3841

3942
// Mining returns an indication if this node is currently mining.

0 commit comments

Comments
 (0)