Skip to content

Commit

Permalink
exclude Vote transactions from updating min-fee-cache (solana-labs#29341
Browse files Browse the repository at this point in the history
)
tao-stones authored and nickfrosty committed Jan 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 43fe4da commit 20fa6af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/src/prioritization_fee_cache.rs
Original file line number Diff line number Diff line change
@@ -198,14 +198,20 @@ impl PrioritizationFeeCache {
}
}

/// Update with a list of transactions' tx_priority_details and tx_account_locks; Only
/// Update with a list of non-vote transactions' tx_priority_details and tx_account_locks; Only
/// transactions have both valid priority_detail and account_locks will be used to update
/// fee_cache asynchronously.
pub fn update<'a>(&self, bank: Arc<Bank>, txs: impl Iterator<Item = &'a SanitizedTransaction>) {
let mut successful_transaction_update_count: u64 = 0;
let (_, send_updates_time) = measure!(
{
for sanitized_transaction in txs {
// Vote transactions are not prioritized, therefore they are excluded from
// updating fee_cache.
if sanitized_transaction.is_simple_vote_transaction() {
continue;
}

let priority_details = sanitized_transaction.get_transaction_priority_details();
let account_locks = sanitized_transaction
.get_account_locks(bank.get_transaction_account_lock_limit());

0 comments on commit 20fa6af

Please sign in to comment.