drop miner tagger logic as it doesnt do what we want it to
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user