add extra debug logging when a channel is not a claim errors

This commit is contained in:
Lex Berezhny 2018-10-30 12:52:52 -04:00
parent 81a6e14a5c
commit 6ee9f2513b

View file

@ -1,3 +1,4 @@
import logging
from decimal import Decimal
from binascii import hexlify
from datetime import datetime
@ -8,6 +9,9 @@ from lbrynet.wallet.dewies import dewies_to_lbc
from lbrynet.wallet.ledger import MainNetLedger
log = logging.getLogger(__name__)
class JSONResponseEncoder(JSONEncoder):
def __init__(self, *args, ledger: MainNetLedger, **kwargs):
@ -75,6 +79,9 @@ class JSONResponseEncoder(JSONEncoder):
)
except BadSignatureError:
output['valid_signature'] = False
except ValueError:
log.exception(f'txo.id: {txo.id}, txo.channel.id:{txo.channel.id}, output: {output}')
output['valid_signature'] = False
if txo.script.is_claim_name:
output['type'] = 'claim'