diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-02-03 02:22:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-02-03 02:22:21 +0800 |
commit | 9aa715805779b6d8856cd36edff01ec421d83f30 (patch) | |
tree | 6fa733fcb2957dc8067b3cde700ca7dfa1d2a7c7 /miner | |
parent | 6005dcef5b5dd4918d4e9aeaed515d867a7cde2a (diff) | |
download | go-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
Diffstat (limited to 'miner')
-rw-r--r-- | miner/api.go | 5 |
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. |