Expand primitives/scanner with niceties needed for the scheduler

This commit is contained in:
Luke Parker
2024-09-01 00:05:08 -04:00
parent bd277e7032
commit 6deb60513c
5 changed files with 75 additions and 13 deletions

View File

@@ -138,6 +138,11 @@ impl<D: Db, S: ScannerFeed> ContinuallyRan for SubstrateTask<D, S> {
}
}
// Drop burns less than the dust
let burns = burns
.into_iter()
.filter(|burn| burn.balance.amount.0 >= S::dust(burn.balance.coin).0)
.collect::<Vec<_>>();
if !burns.is_empty() {
// We send these Burns as stemming from this block we just acknowledged
// This causes them to be acted on after we accumulate the outputs from this block