diff --git a/lbry/error/__init__.py b/lbry/error/__init__.py index 1bc37bac4..2326b6fec 100644 --- a/lbry/error/__init__.py +++ b/lbry/error/__init__.py @@ -217,7 +217,7 @@ class ResolveCensoredError(WalletError): def __init__(self, url, censor_id): self.url = url - self.censor_hash = censor_id + self.censor_id = censor_id super().__init__(f"Resolve of '{url}' was censored by channel with claim id '{censor_id}'.") diff --git a/lbry/schema/result.py b/lbry/schema/result.py index 763ba4be9..73ab1ea6b 100644 --- a/lbry/schema/result.py +++ b/lbry/schema/result.py @@ -179,7 +179,7 @@ class Outputs: txo_message.error.code = ErrorMessage.NOT_FOUND elif isinstance(txo, ResolveCensoredError): txo_message.error.code = ErrorMessage.BLOCKED - set_reference(txo_message.error.blocked.channel, extra_row_dict.get(txo.censor_hash)) + set_reference(txo_message.error.blocked.channel, extra_row_dict.get(bytes.fromhex(txo.censor_id)[::-1])) return txo_message.tx_hash = txo['txo_hash'][:32] txo_message.nout, = struct.unpack(' Tuple[List, List]: txo_rows = [resolve_url(raw_url) for raw_url in urls] extra_txo_rows = _get_referenced_rows( [txo for txo in txo_rows if isinstance(txo, dict)], - [txo.censor_hash for txo in txo_rows if isinstance(txo, ResolveCensoredError)] + [txo.censor_id for txo in txo_rows if isinstance(txo, ResolveCensoredError)] ) return txo_rows, extra_txo_rows