1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 09:34:03 +08:00

misc docs and fmting

This commit is contained in:
Brian Tiger Chow
2014-12-23 15:05:35 -05:00
parent 8d8a1dc7e1
commit c933d439b7
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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")

View File

@ -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