Fill in various DB functions

This commit is contained in:
Luke Parker
2024-08-28 23:31:31 -04:00
parent 738636c238
commit 04a971a024
7 changed files with 77 additions and 19 deletions

View File

@@ -4,6 +4,8 @@ create_db!(
ScannerReport {
// The next block to potentially report
NextToPotentiallyReportBlock: () -> u64,
// The next Batch ID to use
NextBatchId: () -> u32,
}
);
@@ -20,6 +22,8 @@ impl ReportDb {
}
pub(crate) fn acquire_batch_id(txn: &mut impl DbTxn) -> u32 {
todo!("TODO")
let id = NextBatchId::get(txn).unwrap_or(0);
NextBatchId::set(txn, &(id + 1));
id
}
}