Merge pull request #10387 from filecoin-project/feat/lotus-badger-gc
feat:splitstore:Badger GC of hotstore command
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user