Commit ca182aed authored by Brian Tiger Chow's avatar Brian Tiger Chow

misc docs and fmting

parent 39138d13
......@@ -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
......
......@@ -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")
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment