resolve: check if there is a cert before fetching a tx
This commit is contained in:
parent
df649341cd
commit
f2236eb7a4
1 changed files with 1 additions and 1 deletions
|
@ -179,12 +179,12 @@ class Resolver:
|
||||||
claim_result['has_signature'] = False
|
claim_result['has_signature'] = False
|
||||||
if decoded.is_signed:
|
if decoded.is_signed:
|
||||||
claim_tx = await self.network.get_transaction(claim_result['txid'])
|
claim_tx = await self.network.get_transaction(claim_result['txid'])
|
||||||
cert_tx = await self.network.get_transaction(certificate['txid'])
|
|
||||||
if certificate is None:
|
if certificate is None:
|
||||||
log.info("fetching certificate to check claim signature")
|
log.info("fetching certificate to check claim signature")
|
||||||
certificate = await self.network.get_claims_by_ids(decoded.signing_channel_id)
|
certificate = await self.network.get_claims_by_ids(decoded.signing_channel_id)
|
||||||
if not certificate:
|
if not certificate:
|
||||||
log.warning('Certificate %s not found', decoded.signing_channel_id)
|
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['has_signature'] = True
|
||||||
claim_result['signature_is_valid'] = False
|
claim_result['signature_is_valid'] = False
|
||||||
validated, channel_name = validate_claim_signature_and_get_channel_name(
|
validated, channel_name = validate_claim_signature_and_get_channel_name(
|
||||||
|
|
Loading…
Reference in a new issue