diff --git a/exchange/bitswap/bitswap.go b/exchange/bitswap/bitswap.go index 58c7a3584..4ff23aee2 100644 --- a/exchange/bitswap/bitswap.go +++ b/exchange/bitswap/bitswap.go @@ -28,7 +28,9 @@ import ( var log = eventlog.Logger("bitswap") const ( - // Number of providers to request for sending a wantlist to + // maxProvidersPerRequest specifies the maximum number of providers desired + // from the network. This value is specified because the network streams + // results. // TODO: if a 'non-nice' strategy is implemented, consider increasing this value maxProvidersPerRequest = 3 providerRequestTimeout = time.Second * 10 diff --git a/exchange/bitswap/testnet/network_test.go b/exchange/bitswap/testnet/network_test.go index 0728f63d6..1418497f0 100644 --- a/exchange/bitswap/testnet/network_test.go +++ b/exchange/bitswap/testnet/network_test.go @@ -10,12 +10,12 @@ import ( bsmsg "github.com/jbenet/go-ipfs/exchange/bitswap/message" bsnet "github.com/jbenet/go-ipfs/exchange/bitswap/network" peer "github.com/jbenet/go-ipfs/peer" - delay "github.com/jbenet/go-ipfs/util/delay" mockrouting "github.com/jbenet/go-ipfs/routing/mock" + delay "github.com/jbenet/go-ipfs/util/delay" ) func TestSendRequestToCooperativePeer(t *testing.T) { - net := VirtualNetwork(mockrouting.NewServer(),delay.Fixed(0)) + net := VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0)) idOfRecipient := peer.ID("recipient") diff --git a/exchange/bitswap/testutils.go b/exchange/bitswap/testutils.go index 70c1bd7a5..1ff520512 100644 --- a/exchange/bitswap/testutils.go +++ b/exchange/bitswap/testutils.go @@ -26,6 +26,7 @@ func NewSessionGenerator( } } +// TODO move this SessionGenerator to the core package and export it as the core generator type SessionGenerator struct { seq int net tn.Network