diff --git a/cost-model/src/cost_tracker.rs b/cost-model/src/cost_tracker.rs index efdd86512..9d322d009 100644 --- a/cost-model/src/cost_tracker.rs +++ b/cost-model/src/cost_tracker.rs @@ -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); }