From f2236eb7a47032e0bfe6e2e1272e248a043952c7 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 22 Mar 2019 16:35:45 -0300 Subject: [PATCH] resolve: check if there is a cert before fetching a tx --- lbrynet/wallet/resolve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbrynet/wallet/resolve.py b/lbrynet/wallet/resolve.py index 44e8dd717..f295f5d67 100644 --- a/lbrynet/wallet/resolve.py +++ b/lbrynet/wallet/resolve.py @@ -179,12 +179,12 @@ class Resolver: claim_result['has_signature'] = False if decoded.is_signed: claim_tx = await self.network.get_transaction(claim_result['txid']) - cert_tx = await self.network.get_transaction(certificate['txid']) if certificate is None: log.info("fetching certificate to check claim signature") certificate = await self.network.get_claims_by_ids(decoded.signing_channel_id) if not certificate: log.warning('Certificate %s not found', decoded.signing_channel_id) + cert_tx = await self.network.get_transaction(certificate['txid']) if certificate else None claim_result['has_signature'] = True claim_result['signature_is_valid'] = False validated, channel_name = validate_claim_signature_and_get_channel_name(