Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
ca182aed
Commit
ca182aed
authored
Dec 23, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc docs and fmting
parent
39138d13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
bitswap.go
bitswap.go
+3
-1
testnet/network_test.go
testnet/network_test.go
+2
-2
testutils.go
testutils.go
+1
-0
No files found.
bitswap.go
View file @
ca182aed
...
...
@@ -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
...
...
testnet/network_test.go
View file @
ca182aed
...
...
@@ -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"
)
...
...
testutils.go
View file @
ca182aed
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment