From fa797b50f1d8fe70581ea2e29203472c08ca4758 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 9 Oct 2023 12:27:27 -0400 Subject: [PATCH] cleanup comments around priority saturation --- wardrobe/money/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wardrobe/money/src/lib.rs b/wardrobe/money/src/lib.rs index 1543ecbfa..f496a37b1 100644 --- a/wardrobe/money/src/lib.rs +++ b/wardrobe/money/src/lib.rs @@ -150,12 +150,10 @@ impl SimpleConstraintChecker for SpendMoney { ConstraintCheckerError::OutputsExceedInputs ); - // Priority is based on how many token are burned - // Type stuff is kinda ugly. Maybe division would be better? let burned = total_input_value - total_output_value; + // Priority is based on how many token are burned // Just a saturated version of the burned amount. - // TODO can't I use saturating_into or something here instead of writing it myself? let priority = if burned < u64::max_value() as u128 { burned as u64 } else {