Skip to content

Commit

Permalink
check vote costs against block limits in would_fit (solana-labs#34207)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Nov 22, 2023
1 parent 53c723a commit 6d703ed
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 6d703ed

Please sign in to comment.