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
078db5de
Commit
078db5de
authored
Jul 06, 2015
by
Karthik Bala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add transport logic to mocknet
License: MIT Signed-off-by:
Karthik Bala
<
karthikbala444@gmail.com
>
parent
323fd6cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
testutils.go
testutils.go
+2
-2
No files found.
testutils.go
View file @
078db5de
...
...
@@ -46,7 +46,7 @@ func (g *SessionGenerator) Next() Instance {
if
err
!=
nil
{
panic
(
"FIXME"
)
// TODO change signature
}
return
s
ession
(
g
.
ctx
,
g
.
net
,
p
)
return
S
ession
(
g
.
ctx
,
g
.
net
,
p
)
}
func
(
g
*
SessionGenerator
)
Instances
(
n
int
)
[]
Instance
{
...
...
@@ -85,7 +85,7 @@ func (i *Instance) SetBlockstoreLatency(t time.Duration) time.Duration {
// NB: It's easy make mistakes by providing the same peer ID to two different
// sessions. To safeguard, use the SessionGenerator to generate sessions. It's
// just a much better idea.
func
s
ession
(
ctx
context
.
Context
,
net
tn
.
Network
,
p
testutil
.
Identity
)
Instance
{
func
S
ession
(
ctx
context
.
Context
,
net
tn
.
Network
,
p
testutil
.
Identity
)
Instance
{
bsdelay
:=
delay
.
Fixed
(
0
)
const
writeCacheElems
=
100
...
...
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