forked from LBRYCommunity/lbry-sdk
handle claims that dont exist in ES sync
This commit is contained in:
parent
ef6ec03161
commit
31d7823498
1 changed files with 7 additions and 0 deletions
|
@ -638,6 +638,13 @@ class LevelDB:
|
||||||
def claims_producer(self, claim_hashes: Set[bytes]):
|
def claims_producer(self, claim_hashes: Set[bytes]):
|
||||||
batch = []
|
batch = []
|
||||||
for claim_hash in claim_hashes:
|
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)
|
claim = self._fs_get_claim_by_hash(claim_hash)
|
||||||
if claim:
|
if claim:
|
||||||
batch.append(claim)
|
batch.append(claim)
|
||||||
|
|
Loading…
Reference in a new issue