feat(cli): add chain delete cmd

This commit is contained in:
hannahhoward
2020-09-10 10:47:38 -07:00
parent 9e9856bb45
commit 64d150e215
4 changed files with 39 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)
}