forked from LBRYCommunity/lbry-sdk
resolve comments faster by batching maybe
This commit is contained in:
parent
bd83ee7931
commit
f1d7560098
1 changed files with 7 additions and 3 deletions
|
@ -5058,11 +5058,15 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
top_level=not include_replies
|
top_level=not include_replies
|
||||||
)
|
)
|
||||||
if not skip_validation:
|
if not skip_validation:
|
||||||
|
channel_urls = []
|
||||||
|
for comment in result.get('items', []):
|
||||||
|
channel_url = comment.get('channel_url')
|
||||||
|
if channel_url:
|
||||||
|
channel_urls.append(channel_url)
|
||||||
|
resolve_response = await self.resolve([], channel_urls)
|
||||||
|
|
||||||
for comment in result.get('items', []):
|
for comment in result.get('items', []):
|
||||||
channel_url = comment.get('channel_url')
|
channel_url = comment.get('channel_url')
|
||||||
if not channel_url:
|
|
||||||
continue
|
|
||||||
resolve_response = await self.resolve([], [channel_url])
|
|
||||||
if isinstance(resolve_response[channel_url], Output):
|
if isinstance(resolve_response[channel_url], Output):
|
||||||
comment['is_channel_signature_valid'] = comment_client.is_comment_signed_by_channel(
|
comment['is_channel_signature_valid'] = comment_client.is_comment_signed_by_channel(
|
||||||
comment, resolve_response[channel_url]
|
comment, resolve_response[channel_url]
|
||||||
|
|
Loading…
Reference in a new issue