Merge pull request #2834 from lbryio/list_resolve_includes_local_data

when using `--resolve` with local claim `*_list` commands, update resolved result with local metadata (such as `is_mine`)
This commit is contained in:
Lex Berezhny 2020-02-29 15:48:49 -05:00 committed by GitHub
commit 506582aa2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -739,6 +739,7 @@ class Ledger(metaclass=LedgerRegistry):
for txo in txos: for txo in txos:
resolved = response[txo.permanent_url] resolved = response[txo.permanent_url]
if isinstance(resolved, Output): if isinstance(resolved, Output):
resolved.update_annotations(txo)
results.append(resolved) results.append(resolved)
else: else:
if isinstance(resolved, dict) and 'error' in resolved: if isinstance(resolved, dict) and 'error' in resolved:

View file

@ -488,6 +488,9 @@ class ClaimCommands(ClaimTestCase):
self.assertTrue(r[0]['meta']['is_controlling']) self.assertTrue(r[0]['meta']['is_controlling'])
self.assertTrue(r[1]['meta']['is_controlling']) self.assertTrue(r[1]['meta']['is_controlling'])
# check that metadata is transfered
self.assertTrue(r[0]['is_mine'])
class ChannelCommands(CommandTestCase): class ChannelCommands(CommandTestCase):