1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 11:31:54 +08:00

make repo gc call CollectGarbage on datastore

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2018-02-01 13:20:14 +01:00
parent d58da74746
commit 04e43b855b
3 changed files with 17 additions and 4 deletions

View File

@ -86,7 +86,7 @@ func GarbageCollect(n *core.IpfsNode, ctx context.Context) error {
if err != nil {
return err
}
rmed := gc.GC(ctx, n.Blockstore, n.Pinning, roots)
rmed := gc.GC(ctx, n.Blockstore, n.Repo.Datastore(), n.Pinning, roots)
return CollectResult(ctx, rmed, nil)
}
@ -154,7 +154,7 @@ func GarbageCollectAsync(n *core.IpfsNode, ctx context.Context) <-chan gc.Result
return out
}
return gc.GC(ctx, n.Blockstore, n.Pinning, roots)
return gc.GC(ctx, n.Blockstore, n.Repo.Datastore(), n.Pinning, roots)
}
func PeriodicGC(ctx context.Context, node *core.IpfsNode) error {