Skip to content

Commit

Permalink
Fee: calc relu_occupancy_before
Browse files Browse the repository at this point in the history
  • Loading branch information
modship committed Sep 5, 2024
1 parent c8ca2a8 commit 3dcd4ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions massa-execution-worker/src/speculative_deferred_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ impl SpeculativeDeferredCallRegistry {
max_penalty: Amount,
) -> Result<Amount, ExecutionError> {
// linear part of the occupancy before booking the requested amount
let relu_occupancy_before =
std::cmp::max(current_occupancy, target_occupancy).saturating_sub(target_occupancy);
let relu_occupancy_before = current_occupancy.saturating_sub(target_occupancy);

// linear part of the occupancy after booking the requested amount
let relu_occupancy_after = std::cmp::max(
Expand Down

0 comments on commit 3dcd4ab

Please sign in to comment.