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
aa4ba09b
Commit
aa4ba09b
authored
Dec 13, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(bs/testutil) use write cache
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
1c24fdaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
testutils.go
testutils.go
+6
-1
No files found.
testutils.go
View file @
aa4ba09b
...
...
@@ -74,7 +74,12 @@ func session(net tn.Network, rs mockrouting.Server, ps peer.Peerstore, id peer.I
htc
:=
rs
.
Client
(
p
)
bsdelay
:=
delay
.
Fixed
(
0
)
bstore
:=
blockstore
.
NewBlockstore
(
ds_sync
.
MutexWrap
(
datastore2
.
WithDelay
(
ds
.
NewMapDatastore
(),
bsdelay
)))
const
kWriteCacheElems
=
100
bstore
,
err
:=
blockstore
.
WriteCached
(
blockstore
.
NewBlockstore
(
ds_sync
.
MutexWrap
(
datastore2
.
WithDelay
(
ds
.
NewMapDatastore
(),
bsdelay
))),
kWriteCacheElems
)
if
err
!=
nil
{
// FIXME perhaps change signature and return error.
panic
(
err
.
Error
())
}
const
alwaysSendToPeer
=
true
ctx
:=
context
.
TODO
()
...
...
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