diff --git a/lbry/db/queries/resolve.py b/lbry/db/queries/resolve.py index 9b4f36c4b..ba45eb5bb 100644 --- a/lbry/db/queries/resolve.py +++ b/lbry/db/queries/resolve.py @@ -41,7 +41,7 @@ def _get_referenced_rows(txo_rows: List[Output], censor_channels: List[bytes]): def protobuf_resolve(urls, **kwargs) -> str: txo_rows = [resolve_url(raw_url) for raw_url in urls] extra_txo_rows = _get_referenced_rows( - txo_rows, + [txo_row for txo_row in txo_rows if isinstance(txo_row, Output)], [txo.censor_hash for txo in txo_rows if isinstance(txo, ResolveCensoredError)] ) return ResultOutput.to_base64(txo_rows, extra_txo_rows) diff --git a/tests/integration/blockchain/test_blockchain.py b/tests/integration/blockchain/test_blockchain.py index 72afdf1f7..2782fe7b7 100644 --- a/tests/integration/blockchain/test_blockchain.py +++ b/tests/integration/blockchain/test_blockchain.py @@ -912,6 +912,9 @@ class TestGeneralBlockchainSync(SyncingBlockchainTestCase): claim = resolutions[0][0] self.assertTrue(claim.is_signed_by(claim.channel, self.chain.ledger)) + resolutions = Outputs.from_base64(await self.db.protobuf_resolve(["@foo#ab/notfound"])) + self.assertEqual(len(resolutions.txs), 0) + class TestClaimtrieSync(SyncingBlockchainTestCase):