don't panic

This commit is contained in:
Niko Storni 2021-07-08 01:47:57 +02:00
parent 2f15c920d4
commit fbd683e094

View file

@ -517,10 +517,15 @@ func (s *Sync) updateRemoteDB(claims []jsonrpc.Claim, ownClaims []jsonrpc.Claim)
} }
if !claimInDatabase || metadataDiffers || claimIDDiffers || claimNameDiffers || claimMarkedUnpublished || transferStatusMismatch { if !claimInDatabase || metadataDiffers || claimIDDiffers || claimNameDiffers || claimMarkedUnpublished || transferStatusMismatch {
claimSize, err := chainInfo.Claim.GetStreamSizeByMagic() claimSize := uint64(0)
if chainInfo.Claim.Value.GetStream().Source != nil {
claimSize, err = chainInfo.Claim.GetStreamSizeByMagic()
if err != nil { if err != nil {
claimSize = 0 claimSize = 0
} }
} else {
util.SendToSlack("[%s] video with claimID %s has no source?! panic prevented...", s.DbChannelData.ChannelId, chainInfo.ClaimID)
}
fixed++ fixed++
log.Debugf("updating %s in the database", videoID) log.Debugf("updating %s in the database", videoID)
err = s.Manager.ApiConfig.MarkVideoStatus(shared.VideoStatus{ err = s.Manager.ApiConfig.MarkVideoStatus(shared.VideoStatus{