Merge pull request #3741 from filecoin-project/feat/chain-delete-obj

Delete a chain store object
This commit is contained in:
Łukasz Magiera
2020-09-23 19:34:02 +02:00
committed by GitHub
5 changed files with 68 additions and 0 deletions
+4
View File
@@ -197,6 +197,10 @@ func (a *ChainAPI) ChainReadObj(ctx context.Context, obj cid.Cid) ([]byte, error
return blk.RawData(), nil
}
func (a *ChainAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error {
return a.Chain.Blockstore().DeleteBlock(obj)
}
func (a *ChainAPI) ChainHasObj(ctx context.Context, obj cid.Cid) (bool, error) {
return a.Chain.Blockstore().Has(obj)
}