Skip to content

Commit

Permalink
avoid getting program_ids that are not used after all
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Jan 9, 2025
1 parent 77467c4 commit f144108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cost-model/src/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ impl CostModel {
/// Return the instruction data bytes cost.
fn get_instructions_data_cost(transaction: &impl SVMMessage) -> u64 {
let ix_data_bytes_len_total: u64 = transaction
.program_instructions_iter()
.map(|(_, instruction)| instruction.data.len() as u64)
.instructions_iter()
.map(|instruction| instruction.data.len() as u64)
.sum();

ix_data_bytes_len_total / INSTRUCTION_DATA_BYTES_COST
Expand Down

0 comments on commit f144108

Please sign in to comment.