Merge pull request #10387 from filecoin-project/feat/lotus-badger-gc

feat:splitstore:Badger GC of hotstore command
This commit is contained in:
Łukasz Magiera
2023-03-07 08:52:15 +01:00
committed by GitHub
17 changed files with 286 additions and 17 deletions
+11
View File
@@ -748,3 +748,14 @@ func (a *ChainAPI) ChainPrune(ctx context.Context, opts api.PruneOpts) error {
return pruner.PruneChain(opts)
}
func (a *ChainAPI) ChainHotGC(ctx context.Context, opts api.HotGCOpts) error {
pruner, ok := a.BaseBlockstore.(interface {
GCHotStore(api.HotGCOpts) error
})
if !ok {
return xerrors.Errorf("base blockstore does not support hot GC (%T)", a.BaseBlockstore)
}
return pruner.GCHotStore(opts)
}