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
8b8cb267
Commit
8b8cb267
authored
Aug 22, 2021
by
tavit ohanian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'port-2021-04-19'
parents
93a5fd4c
a55a3be6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
test/mock.go
test/mock.go
+5
-1
No files found.
test/mock.go
View file @
8b8cb267
package
bstest
import
(
"time"
.
"gitlab.dms3.io/dms3/go-blockservice"
bitswap
"gitlab.dms3.io/dms3/go-bitswap"
testinstance
"gitlab.dms3.io/dms3/go-bitswap/testinstance"
tn
"gitlab.dms3.io/dms3/go-bitswap/testnet"
delay
"gitlab.dms3.io/dms3/go-dms3-delay"
...
...
@@ -12,7 +15,8 @@ import (
// Mocks returns |n| connected mock Blockservices
func
Mocks
(
n
int
)
[]
BlockService
{
net
:=
tn
.
VirtualNetwork
(
mockrouting
.
NewServer
(),
delay
.
Fixed
(
0
))
sg
:=
testinstance
.
NewTestInstanceGenerator
(
net
)
bsOpts
:=
[]
bitswap
.
Option
{
bitswap
.
ProvideEnabled
(
false
),
bitswap
.
ProviderSearchDelay
(
50
*
time
.
Millisecond
)}
sg
:=
testinstance
.
NewTestInstanceGenerator
(
net
,
nil
,
bsOpts
)
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