From b584a2beab5df0b8afc8ecd96283e43e170ebde7 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 30 Dec 2024 11:07:03 -0500 Subject: [PATCH] Remove old DB entry from the scanner We read from it but never writ to it. It was used to check we didn't flag a block as notable after reporting it, but it was called by the scan task as it scanned a block. We only batch/report blocks after the scan task after scanning them, so it was very redundant. --- processor/scanner/src/db.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/processor/scanner/src/db.rs b/processor/scanner/src/db.rs index 8790da31..e7fd464b 100644 --- a/processor/scanner/src/db.rs +++ b/processor/scanner/src/db.rs @@ -81,8 +81,6 @@ create_db!( ActiveKeys: () -> Vec>, RetireAt: (key: K) -> u64, - // The next block to potentially report - NextToPotentiallyReportBlock: () -> u64, // Highest acknowledged block HighestAcknowledgedBlock: () -> u64, @@ -277,10 +275,6 @@ impl ScannerGlobalDb { blocks in which we receive outputs is notable). */ pub(crate) fn flag_notable_due_to_non_external_output(txn: &mut impl DbTxn, block_number: u64) { - assert!( - NextToPotentiallyReportBlock::get(txn).unwrap() <= block_number, - "already potentially reported a block we're only now flagging as notable" - ); NotableBlock::set(txn, block_number, &()); }