adjust bugs

This commit is contained in:
Niko Storni 2018-08-31 12:22:49 -04:00
parent a0565e809e
commit 2cd2bb6d69
No known key found for this signature in database
GPG key ID: F37FE63398800368
2 changed files with 4 additions and 6 deletions

View file

@ -241,9 +241,7 @@ type ClaimListResponse struct {
LastTakeoverHeight int `json:"last_takeover_height"`
SupportsWithoutClaims []Support `json:"supports_without_claims"`
}
type ClaimListMineResponse struct {
Claims []Claim `json:"claims"`
}
type ClaimListMineResponse []Claim
type ClaimShowResponse Claim
type PeerListResponsePeer struct {

View file

@ -407,14 +407,14 @@ func (s *Sync) doSync() error {
if err != nil {
return errors.Prefix("cannot list claims: ", err)
}
hasDupes, err := hasDupes(claims.Claims)
hasDupes, err := hasDupes(*claims)
if err != nil {
return errors.Prefix("error checking for duplicates: ", err)
}
if hasDupes {
return errors.Err("channel has duplicates! Manual fix required")
}
pubsOnWallet, err := publishesCount(claims.Claims)
pubsOnWallet, err := publishesCount(*claims)
if err != nil {
return errors.Prefix("error counting claims: ", err)
}
@ -428,7 +428,7 @@ func (s *Sync) doSync() error {
return errors.Err("not all published videos are in the database")
}
if pubsOnWallet < pubsOnDB {
SendInfoToSlack("We're claiming to have published %d videos but we only published %d (%s)", pubsOnDB, pubsOnWallet, s.lbryChannelID)
SendInfoToSlack("We're claiming to have published %d videos but we only published %d (%s)", pubsOnDB, pubsOnWallet, s.YoutubeChannelID)
}
err = s.walletSetup()
if err != nil {