Files
serai/processor/scanner/src/report/db.rs

26 lines
647 B
Rust
Raw Normal View History

2024-08-28 20:16:06 -04:00
use serai_db::{Get, DbTxn, create_db};
2024-08-28 19:58:28 -04:00
create_db!(
ScannerReport {
// The next block to potentially report
NextToPotentiallyReportBlock: () -> u64,
}
);
pub(crate) struct ReportDb;
impl ReportDb {
pub(crate) fn set_next_to_potentially_report_block(
txn: &mut impl DbTxn,
next_to_potentially_report_block: u64,
) {
NextToPotentiallyReportBlock::set(txn, &next_to_potentially_report_block);
}
pub(crate) fn next_to_potentially_report_block(getter: &impl Get) -> Option<u64> {
NextToPotentiallyReportBlock::get(getter)
}
pub(crate) fn acquire_batch_id(txn: &mut impl DbTxn) -> u32 {
todo!("TODO")
}
}