Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Jan 10, 2024
1 parent c226598 commit 9540ac5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/src/types/block/semantic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ impl<'a> SemanticValidationContext<'a> {
.ok_or(Error::ConsumedAmountOverflow)?;

let potential_mana = {
let min_amount = consumed_output.minimum_amount(self.protocol_parameters.storage_score_parameters());

let generation_amount = consumed_output.amount().checked_sub(min_amount).unwrap_or_default();
let min_deposit = consumed_output.minimum_amount(self.protocol_parameters.storage_score_parameters());
let generation_amount = consumed_output.amount().saturating_sub(min_deposit);

self.protocol_parameters.potential_mana(
generation_amount,
Expand Down

0 comments on commit 9540ac5

Please sign in to comment.