Skip to content

Commit

Permalink
Merge branch 'releases' into jen/backport
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Mar 15, 2022
2 parents 362c73b + 0ac1bbc commit 8a2a2d0
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 210 deletions.
526 changes: 328 additions & 198 deletions CHANGELOG.md

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"fmt"
"time"

"github.com/libp2p/go-libp2p-core/network"

datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"

"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"
ma "github.com/multiformats/go-multiaddr"
Expand Down Expand Up @@ -124,12 +125,6 @@ func NewDataTransferChannel(hostID peer.ID, channelState datatransfer.ChannelSta
return channel
}

type NetBlockList struct {
Peers []peer.ID
IPAddrs []string
IPSubnets []string
}

type NetStat struct {
System *network.ScopeStat `json:",omitempty"`
Transient *network.ScopeStat `json:",omitempty"`
Expand All @@ -152,6 +147,12 @@ type NetLimit struct {
FD int
}

type NetBlockList struct {
Peers []peer.ID
IPAddrs []string
IPSubnets []string
}

type ExtendedPeerInfo struct {
ID peer.ID
Agent string
Expand Down
4 changes: 2 additions & 2 deletions chain/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func prepSyncTest(t testing.TB, h int) *syncTestUtil {
ctx: ctx,
cancel: cancel,

mn: mocknet.New(),
mn: mocknet.New(ctx),
g: g,
us: filcns.DefaultUpgradeSchedule(),
}
Expand Down Expand Up @@ -158,7 +158,7 @@ func prepSyncTestWithV5Height(t testing.TB, h int, v5height abi.ChainEpoch) *syn
ctx: ctx,
cancel: cancel,

mn: mocknet.New(),
mn: mocknet.New(ctx),
g: g,
us: sched,
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ require (
github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-eventbus v0.2.1
github.com/libp2p/go-libp2p v0.18.0-rc6
github.com/libp2p/go-libp2p-connmgr v0.3.1 // indirect
github.com/libp2p/go-libp2p-connmgr v0.3.1
github.com/libp2p/go-libp2p-core v0.14.0
github.com/libp2p/go-libp2p-discovery v0.6.0
github.com/libp2p/go-libp2p-kad-dht v0.15.0
Expand Down
2 changes: 1 addition & 1 deletion itests/kit/ensemble.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (n *Ensemble) Start() *Ensemble {
// We haven't been bootstrapped yet, we need to generate genesis and
// create the networking backbone.
gtempl = n.generateGenesis()
n.mn = mocknet.New()
n.mn = mocknet.New(ctx)
}

// ---------------------
Expand Down
1 change: 1 addition & 0 deletions markets/loggers/loggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func DataTransferLogger(event datatransfer.Event, state datatransfer.ChannelStat
"sent", state.Sent(),
"received", state.Received(),
"queued", state.Queued(),
"received count", state.ReceivedCidsTotal(),
"total size", state.TotalSize(),
"remote peer", state.OtherPeer(),
"event message", event.Message,
Expand Down
2 changes: 1 addition & 1 deletion node/modules/lp2p/libp2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p"
connmgr "github.com/libp2p/go-libp2p-connmgr"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/peerstore"
"github.com/libp2p/go-libp2p/p2p/net/connmgr"
"go.uber.org/fx"
)

Expand Down

0 comments on commit 8a2a2d0

Please sign in to comment.