Commit aa4ba09b authored by Brian Tiger Chow's avatar Brian Tiger Chow

feat(bs/testutil) use write cache

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 1c24fdaa
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment