mirror of
https://github.com/serai-dex/serai.git
synced 2025-02-02 03:06:31 +00:00
Remove unused ID -> number lookup
This commit is contained in:
parent
775824f373
commit
d429a0bae6
1 changed files with 0 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue