mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Don't scan outputs which are dust, track dust change as operating costs
Fixes #299.
This commit is contained in:
@@ -435,6 +435,7 @@ impl<N: Network> Scheduler<N> {
|
||||
let mut remainder = diff - (per_payment * payments_len);
|
||||
|
||||
for payment in payments.iter_mut() {
|
||||
// TODO: This usage of saturating_sub is invalid as we *need* to subtract this value
|
||||
payment.amount = payment.amount.saturating_sub(per_payment + remainder);
|
||||
// Only subtract the remainder once
|
||||
remainder = 0;
|
||||
|
||||
Reference in New Issue
Block a user