Skip to content

Commit

Permalink
Use ahash for BUILTIN_INSTRUCTION_COSTS
Browse files Browse the repository at this point in the history
Fixes: #2196
  • Loading branch information
ksolana committed Jul 31, 2024
1 parent 948f266 commit 40dbc12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cost-model/src/block_cost_limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use {
address_lookup_table, bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable,
compute_budget, ed25519_program, loader_v4, pubkey::Pubkey, secp256k1_program,
},
std::collections::HashMap,
ahash::AHashMap,
};

/// Static configurations:
Expand Down Expand Up @@ -37,7 +37,7 @@ pub const INSTRUCTION_DATA_BYTES_COST: u64 = 140 /*bytes per us*/ / COMPUTE_UNIT
// Number of compute units for each built-in programs
lazy_static! {
/// Number of compute units for each built-in programs
pub static ref BUILTIN_INSTRUCTION_COSTS: HashMap<Pubkey, u64> = [
pub static ref BUILTIN_INSTRUCTION_COSTS: AHashMap<Pubkey, u64> = [
(solana_stake_program::id(), solana_stake_program::stake_instruction::DEFAULT_COMPUTE_UNITS),
(solana_config_program::id(), solana_config_program::config_processor::DEFAULT_COMPUTE_UNITS),
(solana_vote_program::id(), solana_vote_program::vote_processor::DEFAULT_COMPUTE_UNITS),
Expand Down

0 comments on commit 40dbc12

Please sign in to comment.