From d429a0bae6178bb4d408f452ecf83f08fbff7490 Mon Sep 17 00:00:00 2001 From: Luke Parker <lukeparker5132@gmail.com> Date: Fri, 30 Aug 2024 00:11:31 -0400 Subject: [PATCH] Remove unused ID -> number lookup --- processor/scanner/src/index/db.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/processor/scanner/src/index/db.rs b/processor/scanner/src/index/db.rs index a46d6fa6..9254f9bc 100644 --- a/processor/scanner/src/index/db.rs +++ b/processor/scanner/src/index/db.rs @@ -4,8 +4,6 @@ create_db!( ScannerIndex { // A lookup of a block's number to its ID BlockId: (number: u64) -> [u8; 32], - // A lookup of a block's ID to its number - BlockNumber: (id: [u8; 32]) -> u64, // The latest finalized block to appear on the blockchain LatestFinalizedBlock: () -> u64, @@ -16,14 +14,10 @@ pub(crate) struct IndexDb; impl IndexDb { pub(crate) fn set_block(txn: &mut impl DbTxn, number: u64, id: [u8; 32]) { BlockId::set(txn, number, &id); - BlockNumber::set(txn, id, &number); } pub(crate) fn block_id(getter: &impl Get, number: u64) -> Option<[u8; 32]> { BlockId::get(getter, number) } - pub(crate) fn block_number(getter: &impl Get, id: [u8; 32]) -> Option<u64> { - BlockNumber::get(getter, id) - } pub(crate) fn set_latest_finalized_block(txn: &mut impl DbTxn, latest_finalized_block: u64) { LatestFinalizedBlock::set(txn, &latest_finalized_block);