drop miner tagger logic as it doesnt do what we want it to

This commit is contained in:
whyrusleeping
2019-12-17 10:16:10 -08:00
parent 8284436eae
commit ca7e2e76c2
4 changed files with 2 additions and 107 deletions
-19
View File
@@ -1,20 +1,16 @@
package lp2p
import (
"context"
"crypto/rand"
"time"
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/peers"
"golang.org/x/xerrors"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p"
connmgr "github.com/libp2p/go-libp2p-connmgr"
"github.com/libp2p/go-libp2p-core/crypto"
host "github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/peerstore"
"go.uber.org/fx"
@@ -99,18 +95,3 @@ func simpleOpt(opt libp2p.Option) func() (opts Libp2pOpts, err error) {
return
}
}
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 {
pt.Run()
return nil
},
OnStop: func(ctx context.Context) error {
return pt.Close()
},
})
return
}