Skip to content

Commit

Permalink
don't panic
Browse files Browse the repository at this point in the history
  • Loading branch information
nikooo777 committed Jul 7, 2021
1 parent 2f15c92 commit fbd683e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions manager/ytsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,14 @@ func (s *Sync) updateRemoteDB(claims []jsonrpc.Claim, ownClaims []jsonrpc.Claim)
}

if !claimInDatabase || metadataDiffers || claimIDDiffers || claimNameDiffers || claimMarkedUnpublished || transferStatusMismatch {
claimSize, err := chainInfo.Claim.GetStreamSizeByMagic()
if err != nil {
claimSize = 0
claimSize := uint64(0)
if chainInfo.Claim.Value.GetStream().Source != nil {
claimSize, err = chainInfo.Claim.GetStreamSizeByMagic()
if err != nil {
claimSize = 0
}
} else {
util.SendToSlack("[%s] video with claimID %s has no source?! panic prevented...", s.DbChannelData.ChannelId, chainInfo.ClaimID)
}
fixed++
log.Debugf("updating %s in the database", videoID)
Expand Down

0 comments on commit fbd683e

Please sign in to comment.