Setup PeerTagger as Invoke

This commit is contained in:
Łukasz Magiera
2019-12-17 17:28:02 +01:00
parent 8d0d2b2fae
commit 8284436eae
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ func simpleOpt(opt libp2p.Option) func() (opts Libp2pOpts, err error) {
}
}
func TagMiners(lc fx.Lifecycle, h host.Host, stmgr *stmgr.StateManager) *peers.PeerTagger {
func TagMiners(lc fx.Lifecycle, h host.Host, stmgr *stmgr.StateManager) {
pt := peers.NewPeerTagger(h, stmgr)
lc.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
@@ -112,5 +112,5 @@ func TagMiners(lc fx.Lifecycle, h host.Host, stmgr *stmgr.StateManager) *peers.P
},
})
return pt
return
}