From 31d7823498502006c800316d2d1a9d3fba22dd68 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Mon, 26 Jul 2021 10:04:25 -0400 Subject: [PATCH] handle claims that dont exist in ES sync --- lbry/wallet/server/leveldb.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index d834094c6..4113c52d7 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -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)