handle unicode error for unnormalized names
This commit is contained in:
parent
3a1baf0700
commit
54903fc2ea
1 changed files with 4 additions and 1 deletions
|
@ -411,7 +411,10 @@ class BlockProcessor:
|
||||||
|
|
||||||
def _add_claim_or_update(self, height: int, txo: 'Output', tx_hash: bytes, tx_num: int, nout: int,
|
def _add_claim_or_update(self, height: int, txo: 'Output', tx_hash: bytes, tx_num: int, nout: int,
|
||||||
spent_claims: typing.Dict[bytes, typing.Tuple[int, int, str]]):
|
spent_claims: typing.Dict[bytes, typing.Tuple[int, int, str]]):
|
||||||
claim_name = txo.script.values['claim_name'].decode()
|
try:
|
||||||
|
claim_name = txo.script.values['claim_name'].decode()
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
claim_name = ''.join(chr(c) for c in txo.script.values['claim_name'])
|
||||||
try:
|
try:
|
||||||
normalized_name = txo.normalized_name
|
normalized_name = txo.normalized_name
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|
Loading…
Reference in a new issue