Merge pull request #2737 from lbryio/fix_repost_resolve_bug
fix bug where repost claims were not being fully resolved
This commit is contained in:
commit
8d8a5b36b6
1 changed files with 13 additions and 12 deletions
|
@ -233,6 +233,8 @@ class SQLDB:
|
||||||
self.filtered_channels.update(self.blocked_channels)
|
self.filtered_channels.update(self.blocked_channels)
|
||||||
|
|
||||||
def update_claims_from_channel_hashes(self, shared_streams, shared_channels, channel_hashes):
|
def update_claims_from_channel_hashes(self, shared_streams, shared_channels, channel_hashes):
|
||||||
|
streams, channels = {}, {}
|
||||||
|
if channel_hashes:
|
||||||
sql = query(
|
sql = query(
|
||||||
"SELECT claim.channel_hash, claim.reposted_claim_hash, reposted.claim_type "
|
"SELECT claim.channel_hash, claim.reposted_claim_hash, reposted.claim_type "
|
||||||
"FROM claim JOIN claim AS reposted ON (reposted.claim_hash=claim.reposted_claim_hash)", **{
|
"FROM claim JOIN claim AS reposted ON (reposted.claim_hash=claim.reposted_claim_hash)", **{
|
||||||
|
@ -240,7 +242,6 @@ class SQLDB:
|
||||||
'claim.channel_hash__in': channel_hashes
|
'claim.channel_hash__in': channel_hashes
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
streams, channels = {}, {}
|
|
||||||
for blocked_claim in self.execute(*sql):
|
for blocked_claim in self.execute(*sql):
|
||||||
if blocked_claim.claim_type == CLAIM_TYPES['stream']:
|
if blocked_claim.claim_type == CLAIM_TYPES['stream']:
|
||||||
streams[blocked_claim.reposted_claim_hash] = blocked_claim.channel_hash
|
streams[blocked_claim.reposted_claim_hash] = blocked_claim.channel_hash
|
||||||
|
|
Loading…
Reference in a new issue