mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-11 11:19:05 +08:00
feat(bs/testutil) use write cache
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
3ecdec985f
commit
cf43cdd5d8
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user