From 53e38289659c0293a2234a2916622ce0e3cb67c7 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 6 Jan 2022 12:46:49 -0500 Subject: [PATCH] remove redundant undo cleanup, don't delete historic touched_or_deleted --- lbry/wallet/server/block_processor.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lbry/wallet/server/block_processor.py b/lbry/wallet/server/block_processor.py index 45bdb0ceb..daa858a89 100644 --- a/lbry/wallet/server/block_processor.py +++ b/lbry/wallet/server/block_processor.py @@ -1407,16 +1407,6 @@ class BlockProcessor: self.db.headers.append(block.header) self.tip = self.coin.header_hash(block.header) - min_height = self.db.min_undo_height(self.db.db_height) - if min_height > 0: # delete undos for blocks deep enough they can't be reorged - undo_to_delete = list(self.db.prefix_db.undo.iterate(start=(0,), stop=(min_height,))) - for (k, v) in undo_to_delete: - self.db.prefix_db.undo.stage_delete((k,), (v,)) - touched_or_deleted_to_delete = list(self.db.prefix_db.touched_or_deleted.iterate( - start=(0,), stop=(min_height,)) - ) - for (k, v) in touched_or_deleted_to_delete: - self.db.prefix_db.touched_or_deleted.stage_delete(k, v) self.db.fs_height = self.height self.db.fs_tx_count = self.tx_count