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-blockservice
Commits
5cf1ea2d
Commit
5cf1ea2d
authored
Dec 12, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(bs/testnet) use delay in virtual network
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
0c7694cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mock.go
mock.go
+3
-2
No files found.
mock.go
View file @
5cf1ea2d
...
...
@@ -5,12 +5,13 @@ import (
bitswap
"github.com/jbenet/go-ipfs/exchange/bitswap"
tn
"github.com/jbenet/go-ipfs/exchange/bitswap/testnet"
"github.com/jbenet/go-ipfs/routing/mock"
mock
"github.com/jbenet/go-ipfs/routing/mock"
delay
"github.com/jbenet/go-ipfs/util/delay"
)
// Mocks returns |n| connected mock Blockservices
func
Mocks
(
t
*
testing
.
T
,
n
int
)
[]
*
BlockService
{
net
:=
tn
.
VirtualNetwork
()
net
:=
tn
.
VirtualNetwork
(
delay
.
Fixed
(
0
)
)
rs
:=
mock
.
VirtualRoutingServer
()
sg
:=
bitswap
.
NewSessionGenerator
(
net
,
rs
)
...
...
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