From 2753713e5648fc838a8669f1dac776cbec0e4ab9 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 24 Sep 2023 15:25:43 -0400 Subject: [PATCH] Add missing if statement --- processor/src/multisigs/scanner.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/processor/src/multisigs/scanner.rs b/processor/src/multisigs/scanner.rs index 92187c5e9..5329787d8 100644 --- a/processor/src/multisigs/scanner.rs +++ b/processor/src/multisigs/scanner.rs @@ -333,10 +333,12 @@ impl ScannerHandle { self.held_scanner = Some(scanner); - // Load the key from the DB, as it will have already been removed from RAM + // Load the key from the DB, as it will have already been removed from RAM if retired let key = ScannerDb::::keys(txn)[0].1; let is_retirement_block = ScannerDb::::retirement_block(txn, &key) == Some(number); - ScannerDb::::retire_key(txn); + if is_retirement_block { + ScannerDb::::retire_key(txn); + } (is_retirement_block, outputs) }