From ad7dee3e7fe765797fa26ade7c0b7fc58147aab3 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 7 Jul 2021 23:05:18 -0400 Subject: [PATCH] fix es sync --- lbry/wallet/server/leveldb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/server/leveldb.py b/lbry/wallet/server/leveldb.py index e9d813882..2b72f9065 100644 --- a/lbry/wallet/server/leveldb.py +++ b/lbry/wallet/server/leveldb.py @@ -609,7 +609,10 @@ class LevelDB: def all_claims_producer(self, batch_size=500_000): batch = [] - for claim_hash in self.db.iterator(prefix=Prefixes.claim_to_txo.prefix, include_value=False): + for claim_hash, v in self.db.iterator(prefix=Prefixes.claim_to_txo.prefix): + # TODO: fix the couple of claim txos that dont have controlling names + if not self.db.get(Prefixes.claim_takeover.pack_key(Prefixes.claim_to_txo.unpack_value(v).name)): + continue claim = self._fs_get_claim_by_hash(claim_hash[1:]) if claim: batch.append(claim)