Don't scan outputs which are dust, track dust change as operating costs

Fixes #299.
This commit is contained in:
Luke Parker
2023-10-19 08:02:10 -04:00
parent d833254b84
commit 7b2dec63ce
8 changed files with 70 additions and 22 deletions

View File

@@ -553,7 +553,9 @@ impl<N: Network, D: Db> Scanner<N, D> {
// TODO: These lines are the ones which will cause a really long-lived lock acquisiton
for output in network.get_outputs(&block, key).await {
assert_eq!(output.key(), key);
outputs.push(output);
if output.amount() >= N::DUST {
outputs.push(output);
}
}
for (id, (block_number, tx)) in network