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:
@@ -132,6 +132,11 @@ impl<N: Network> Plan<N> {
|
||||
res
|
||||
}
|
||||
|
||||
pub fn expected_change(&self) -> u64 {
|
||||
self.inputs.iter().map(|input| input.amount()).sum::<u64>() -
|
||||
self.payments.iter().map(|payment| payment.amount).sum::<u64>()
|
||||
}
|
||||
|
||||
pub fn write<W: io::Write>(&self, writer: &mut W) -> io::Result<()> {
|
||||
writer.write_all(self.key.to_bytes().as_ref())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user