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