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:
@ -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
|
||||
|
Reference in New Issue
Block a user