From ca57dcfc2f00b5e167361cd4c198788ccb68d772 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 20 Jul 2021 12:29:14 -0400 Subject: [PATCH] handle failure to generate a short id --- lbry/wallet/server/leveldb.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index 3f6f55a12..20aa5cf65 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -218,7 +218,11 @@ class LevelDB: if k.root_tx_num == root_tx_num and k.root_position == root_position: return f'{name}#{k.partial_claim_id}' break - raise Exception('wat') + print(f"{claim_id} has a collision") + # FIXME: there are a handful of claims that appear to have short id collisions but really do not + # these claims are actually abandoned, but are not handled correctly because they are abandoned in the + # same tx as their channel. + return f'{name}#{claim_id}' def _prepare_resolve_result(self, tx_num: int, position: int, claim_hash: bytes, name: str, root_tx_num: int, root_position: int, activation_height: int, signature_valid: bool) -> ResolveResult: