handle claims that dont exist in ES sync

This commit is contained in:
Jack Robison 2021-07-26 10:04:25 -04:00
parent 0fb6f05fba
commit 25147d8897
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -638,6 +638,13 @@ class LevelDB:
def claims_producer(self, claim_hashes: Set[bytes]):
batch = []
for claim_hash in claim_hashes:
if claim_hash not in self.claim_to_txo:
self.logger.warning("can't sync non existent claim to ES: %s", claim_hash.hex())
continue
name = self.claim_to_txo[claim_hash].name
if not self.db.get(Prefixes.claim_takeover.pack_key(name)):
self.logger.warning("can't sync non existent claim to ES: %s", claim_hash.hex())
continue
claim = self._fs_get_claim_by_hash(claim_hash)
if claim:
batch.append(claim)