handle invalid claim update
This commit is contained in:
parent
09bb1ba494
commit
8f9e7f77a7
1 changed files with 5 additions and 0 deletions
|
@ -478,6 +478,11 @@ class BlockProcessor:
|
||||||
if claim_hash not in spent_claims:
|
if claim_hash not in spent_claims:
|
||||||
# print(f"\tthis is a wonky tx, contains unlinked claim update {claim_hash.hex()}")
|
# print(f"\tthis is a wonky tx, contains unlinked claim update {claim_hash.hex()}")
|
||||||
return
|
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)
|
(prev_tx_num, prev_idx, _) = spent_claims.pop(claim_hash)
|
||||||
# print(f"\tupdate {claim_hash.hex()} {tx_hash[::-1].hex()} {txo.amount}")
|
# print(f"\tupdate {claim_hash.hex()} {tx_hash[::-1].hex()} {txo.amount}")
|
||||||
if (prev_tx_num, prev_idx) in self.txo_to_claim:
|
if (prev_tx_num, prev_idx) in self.txo_to_claim:
|
||||||
|
|
Loading…
Reference in a new issue