@cryptotaxi247 / kubo / commits / c933d439b

misc docs and fmting

Brian Tiger Chow committed Dec 23, 2014 at 15:05 UTC c933d439b76f121e4bc029b326677b930597fb7e
3 files changed +6 -3
exchange/bitswap/bitswap.go
+3 -1
@@ -28,7 +28,9 @@ import (
28 var log = eventlog.Logger("bitswap")
29
30 const (
31 - // Number of providers to request for sending a wantlist to
31 + // maxProvidersPerRequest specifies the maximum number of providers desired
32 + // from the network. This value is specified because the network streams
33 + // results.
34 // TODO: if a 'non-nice' strategy is implemented, consider increasing this value
35 maxProvidersPerRequest = 3
36 providerRequestTimeout = time.Second * 10
exchange/bitswap/testnet/network_test.go
+2 -2
@@ -10,12 +10,12 @@ import (
10 bsmsg "github.com/jbenet/go-ipfs/exchange/bitswap/message"
11 bsnet "github.com/jbenet/go-ipfs/exchange/bitswap/network"
12 peer "github.com/jbenet/go-ipfs/peer"
13 - delay "github.com/jbenet/go-ipfs/util/delay"
13 mockrouting "github.com/jbenet/go-ipfs/routing/mock"
14 + delay "github.com/jbenet/go-ipfs/util/delay"
15 )
16
17 func TestSendRequestToCooperativePeer(t *testing.T) {
18 - net := VirtualNetwork(mockrouting.NewServer(),delay.Fixed(0))
18 + net := VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
19
20 idOfRecipient := peer.ID("recipient")
21
exchange/bitswap/testutils.go
+1
@@ -26,6 +26,7 @@ func NewSessionGenerator(
26 }
27 }
28
29 +// TODO move this SessionGenerator to the core package and export it as the core generator
30 type SessionGenerator struct {
31 seq int
32 net tn.Network