Skip to content

Commit

Permalink
check vote costs against block limits in would_fit (#34207)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6d703ed)
  • Loading branch information
apfitzge authored and mergify[bot] committed Nov 22, 2023
1 parent 6bc02d5 commit eab434d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cost-model/src/cost_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ impl CostTracker {
if self.vote_cost.saturating_add(cost) > self.vote_cost_limit {
return Err(CostTrackerError::WouldExceedVoteMaxLimit);
}
} else if self.block_cost.saturating_add(cost) > self.block_cost_limit {
}

if self.block_cost.saturating_add(cost) > self.block_cost_limit {
// check against the total package cost
return Err(CostTrackerError::WouldExceedBlockMaxLimit);
}
Expand Down

0 comments on commit eab434d

Please sign in to comment.