mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-06 03:19:47 +08:00
17 lines
554 B
Go
17 lines
554 B
Go
package mdutils
|
|
|
|
import (
|
|
"github.com/ipfs/go-ipfs/blocks/blockstore"
|
|
bsrv "github.com/ipfs/go-ipfs/blockservice"
|
|
"github.com/ipfs/go-ipfs/exchange/offline"
|
|
dag "github.com/ipfs/go-ipfs/merkledag"
|
|
ds "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore"
|
|
dssync "gx/ipfs/QmTxLSvdhwg68WJimdS6icLPhZi28aTp6b7uihC2Yb47Xk/go-datastore/sync"
|
|
)
|
|
|
|
func Mock() dag.DAGService {
|
|
bstore := blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore()))
|
|
bserv := bsrv.New(bstore, offline.Exchange(bstore))
|
|
return dag.NewDAGService(bserv)
|
|
}
|