From 7ef0ae12a16eaa23cc242f20b89fd2c44551ff1b Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 30 Jul 2021 14:41:01 -0400 Subject: [PATCH] handle invalid claim update --- lbry/wallet/server/block_processor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lbry/wallet/server/block_processor.py b/lbry/wallet/server/block_processor.py index e22b3486f..4eb99fb8f 100644 --- a/lbry/wallet/server/block_processor.py +++ b/lbry/wallet/server/block_processor.py @@ -478,6 +478,11 @@ class BlockProcessor: if claim_hash not in spent_claims: # print(f"\tthis is a wonky tx, contains unlinked claim update {claim_hash.hex()}") return + if claim_name != spent_claims[claim_hash][2]: + self.logger.warning( + f"{tx_hash[::-1].hex()} contains mismatched name for claim update {claim_hash.hex()}" + ) + return (prev_tx_num, prev_idx, _) = spent_claims.pop(claim_hash) # print(f"\tupdate {claim_hash.hex()} {tx_hash[::-1].hex()} {txo.amount}") if (prev_tx_num, prev_idx) in self.txo_to_claim: