Merge pull request #4296 from filecoin-project/feat/sync-unmarkbad-all

sync unmark-bad --all
This commit is contained in:
Łukasz Magiera
2020-10-10 22:35:56 +02:00
committed by GitHub
7 changed files with 45 additions and 2 deletions
+6
View File
@@ -118,6 +118,12 @@ func (a *SyncAPI) SyncUnmarkBad(ctx context.Context, bcid cid.Cid) error {
return nil
}
func (a *SyncAPI) SyncUnmarkAllBad(ctx context.Context) error {
log.Warnf("Dropping bad block cache")
a.Syncer.UnmarkAllBad()
return nil
}
func (a *SyncAPI) SyncCheckBad(ctx context.Context, bcid cid.Cid) (string, error) {
reason, ok := a.Syncer.CheckBadBlockCache(bcid)
if !ok {