Call tidy_keys upon queue_key

Prevents the potential case of the substrate task and the scan task writing to
the same storage slot at once.
This commit is contained in:
Luke Parker
2024-09-19 01:05:36 -04:00
parent 673cf8fd47
commit a691be21c8
2 changed files with 25 additions and 24 deletions

View File

@@ -116,9 +116,6 @@ impl<D: Db, S: ScannerFeed> ContinuallyRan for ScanTask<D, S> {
assert_eq!(ScanDb::<S>::next_to_scan_for_outputs_block(&txn).unwrap(), b);
// Tidy the keys, then fetch them
// We don't have to tidy them here, we just have to somewhere, so why not here?
ScannerGlobalDb::<S>::tidy_keys(&mut txn);
let keys = ScannerGlobalDb::<S>::active_keys_as_of_next_to_scan_for_outputs_block(&txn)
.expect("scanning for a blockchain without any keys set");