Have the scan flag blocks with change/branch/forwarded as notable

This commit is contained in:
Luke Parker
2024-08-24 17:30:02 -04:00
parent d5d1fc3eea
commit 945f31dfc7
3 changed files with 14 additions and 0 deletions

View File

@@ -120,6 +120,7 @@ impl<S: ScannerFeed> ScannerDb<S> {
}
// TODO: This will be called from the Eventuality task yet this field is read by the scan task
// We need to write the argument for its safety
// TODO: retire_key needs to set the notable block
pub(crate) fn retire_key(txn: &mut impl DbTxn, key: KeyFor<S>) {
let mut keys: Vec<SeraiKeyDbEntry<BorshG<KeyFor<S>>>> =
ActiveKeys::get(txn).expect("retiring key yet no active keys");
@@ -276,6 +277,10 @@ impl<S: ScannerFeed> ScannerDb<S> {
SerializedForwardedOutput::set(txn, id.as_ref(), &buf);
}
pub(crate) fn flag_notable(txn: &mut impl DbTxn, block_number: u64) {
NotableBlock::set(txn, block_number, &());
}
// TODO: Use a DbChannel here, and send the instructions to the report task and the outputs to
// the eventuality task? That way this cleans up after itself
pub(crate) fn set_in_instructions(