Merge pull request #1064 from filecoin-project/fix/drop-th-pnet

Drop pnet from townhall
This commit is contained in:
Łukasz Magiera 2020-01-14 00:37:29 +01:00 committed by GitHub
commit d6174292b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"strings"
"time"
rice "github.com/GeertJohan/go.rice"
@ -16,11 +15,9 @@ import (
blockstore "github.com/ipfs/go-ipfs-blockstore"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/peer"
pnet "github.com/libp2p/go-libp2p-pnet"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/node/modules/lp2p"
)
var topic = "/fil/headnotifs/"
@ -61,15 +58,9 @@ func main() {
ctx := context.Background()
protec, err := pnet.NewProtector(strings.NewReader(lp2p.LotusKey))
if err != nil {
panic(err)
}
host, err := libp2p.New(
ctx,
libp2p.Defaults,
libp2p.PrivateNetwork(protec),
)
if err != nil {
panic(err)