aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-02-03 02:22:21 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-02-03 02:22:21 +0800
commit9aa715805779b6d8856cd36edff01ec421d83f30 (patch)
tree6fa733fcb2957dc8067b3cde700ca7dfa1d2a7c7
parent6005dcef5b5dd4918d4e9aeaed515d867a7cde2a (diff)
downloadgo-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar.gz
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar.bz2
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar.lz
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar.xz
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.tar.zst
go-tangerine-9aa715805779b6d8856cd36edff01ec421d83f30.zip
miner: register newly created remote agent in the API
-rw-r--r--miner/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/miner/api.go b/miner/api.go
index 42678b5ad..fae2203f5 100644
--- a/miner/api.go
+++ b/miner/api.go
@@ -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.