Add a SyncUnmarkBad API

This commit is contained in:
Aayush Rajasekaran
2020-09-09 14:34:05 -04:00
parent 7d2118cd97
commit 5c852e26c2
5 changed files with 23 additions and 0 deletions
+6
View File
@@ -108,6 +108,12 @@ func (a *SyncAPI) SyncMarkBad(ctx context.Context, bcid cid.Cid) error {
return nil
}
func (a *SyncAPI) SyncUnmarkBad(ctx context.Context, bcid cid.Cid) error {
log.Warnf("Unmarking block %s as bad", bcid)
a.Syncer.UnmarkBad(bcid)
return nil
}
func (a *SyncAPI) SyncCheckBad(ctx context.Context, bcid cid.Cid) (string, error) {
reason, ok := a.Syncer.CheckBadBlockCache(bcid)
if !ok {