Merge pull request #6222 from ipfs/fix/dht-321

test(coreapi): use a thread-safe datastore everywhere
This commit is contained in:
Steven Allen 2019-05-08 23:49:58 -07:00 committed by GitHub
commit a5066255d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,10 +71,10 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
c.Identity = ident
c.Experimental.FilestoreEnabled = true
ds := datastore.NewMapDatastore()
ds := syncds.MutexWrap(datastore.NewMapDatastore())
r := &repo.Mock{
C: c,
D: syncds.MutexWrap(ds),
D: ds,
K: keystore.NewMemKeystore(),
F: filestore.NewFileManager(ds, filepath.Dir(os.TempDir())),
}