mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-09 10:18:04 +08:00
namecache: initialize blockstore
License: MIT Signed-off-by: vyzo <vyzo@hackzen.org>
This commit is contained in:
parent
e76e4c58a0
commit
795d9e8d78
@ -590,7 +590,7 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, routingOptio
|
||||
|
||||
// setup name system
|
||||
n.Namesys = namesys.NewNameSystem(n.Routing, n.Repo.Datastore(), size)
|
||||
n.Namecache = namecache.NewNameCache(ctx, n.Namesys, n.Pinning, n.DAG)
|
||||
n.Namecache = namecache.NewNameCache(ctx, n.Namesys, n.Pinning, n.DAG, n.Blockstore)
|
||||
|
||||
// setup ipns republishing
|
||||
return n.setupIpnsRepublisher()
|
||||
|
||||
@ -48,12 +48,13 @@ type nameCache struct {
|
||||
mx sync.Mutex
|
||||
}
|
||||
|
||||
func NewNameCache(ctx context.Context, nsys namesys.NameSystem, pinning pin.Pinner, dag ipld.DAGService) NameCache {
|
||||
func NewNameCache(ctx context.Context, nsys namesys.NameSystem, pinning pin.Pinner, dag ipld.DAGService, bstore bstore.GCBlockstore) NameCache {
|
||||
return &nameCache{
|
||||
ctx: ctx,
|
||||
nsys: nsys,
|
||||
pinning: pinning,
|
||||
dag: dag,
|
||||
bstore: bstore,
|
||||
follows: make(map[string]func()),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user