don't fail on abandoned videos
This commit is contained in:
parent
cff147bb95
commit
b6861dae9b
1 changed files with 11 additions and 2 deletions
|
@ -638,8 +638,17 @@ func (s *Sync) updateRemoteDB(claims []jsonrpc.Claim, ownClaims []jsonrpc.Claim)
|
||||||
if sv.Transferred {
|
if sv.Transferred {
|
||||||
_, ok := allClaimsInfo[vID]
|
_, ok := allClaimsInfo[vID]
|
||||||
if !ok && sv.Published {
|
if !ok && sv.Published {
|
||||||
log.Warnf("%s: claims to be published and transferred but wasn't found in the list of claims", vID)
|
searchResponse, err := s.daemon.ClaimSearch(nil, &sv.ClaimID, nil, nil, 1, 20)
|
||||||
idsToRemove = append(idsToRemove, vID)
|
if err != nil {
|
||||||
|
log.Error(err.Error())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if len(searchResponse.Claims) == 0 {
|
||||||
|
log.Debugf("%s: was transferred but appears abandoned! we should ignore this - claimID: %s", vID, sv.ClaimID)
|
||||||
|
continue //TODO: we should flag these on the db
|
||||||
|
} else {
|
||||||
|
return count, fixed, 0, errors.Err("%s: isn't our control but is on the database and on the blockchain. wtf is up? ClaimID: %s", vID, sv.ClaimID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue