From 15575fa59241b94d5b5e966831e6bc21104bf48c Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Thu, 20 Jun 2024 11:38:40 -0500 Subject: [PATCH] Clean up: remove unused _feature_set --- core/src/banking_stage/immutable_deserialized_packet.rs | 4 +--- core/src/banking_stage/latest_unprocessed_votes.rs | 1 - .../transaction_scheduler/scheduler_controller.rs | 2 -- core/src/banking_stage/unprocessed_packet_batches.rs | 8 -------- core/src/banking_stage/unprocessed_transaction_storage.rs | 2 -- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/core/src/banking_stage/immutable_deserialized_packet.rs b/core/src/banking_stage/immutable_deserialized_packet.rs index bd64b81f77ec3a..cb4561d50d8f08 100644 --- a/core/src/banking_stage/immutable_deserialized_packet.rs +++ b/core/src/banking_stage/immutable_deserialized_packet.rs @@ -3,7 +3,6 @@ use { solana_perf::packet::Packet, solana_runtime::compute_budget_details::{ComputeBudgetDetails, GetComputeBudgetDetails}, solana_sdk::{ - feature_set, hash::Hash, message::Message, pubkey::Pubkey, @@ -15,7 +14,7 @@ use { VersionedTransaction, }, }, - std::{cmp::Ordering, collections::HashSet, mem::size_of, sync::Arc}, + std::{cmp::Ordering, collections::HashSet, mem::size_of}, thiserror::Error, }; @@ -106,7 +105,6 @@ impl ImmutableDeserializedPacket { // messages. pub fn build_sanitized_transaction( &self, - _feature_set: &Arc, votes_only: bool, address_loader: impl AddressLoader, reserved_account_keys: &HashSet, diff --git a/core/src/banking_stage/latest_unprocessed_votes.rs b/core/src/banking_stage/latest_unprocessed_votes.rs index d7455038d6410e..084e4125b842ae 100644 --- a/core/src/banking_stage/latest_unprocessed_votes.rs +++ b/core/src/banking_stage/latest_unprocessed_votes.rs @@ -292,7 +292,6 @@ impl LatestUnprocessedVotes { let deserialized_vote_packet = vote.vote.as_ref().unwrap().clone(); if let Some(sanitized_vote_transaction) = deserialized_vote_packet .build_sanitized_transaction( - &bank.feature_set, bank.vote_only_bank(), bank.as_ref(), bank.get_reserved_account_keys(), diff --git a/core/src/banking_stage/transaction_scheduler/scheduler_controller.rs b/core/src/banking_stage/transaction_scheduler/scheduler_controller.rs index 57a52f58a5c1cc..20462a2a1b42b2 100644 --- a/core/src/banking_stage/transaction_scheduler/scheduler_controller.rs +++ b/core/src/banking_stage/transaction_scheduler/scheduler_controller.rs @@ -475,7 +475,6 @@ impl SchedulerController { let bank = self.bank_forks.read().unwrap().working_bank(); let last_slot_in_epoch = bank.epoch_schedule().get_last_slot_in_epoch(bank.epoch()); let transaction_account_lock_limit = bank.get_transaction_account_lock_limit(); - let feature_set = &bank.feature_set; let vote_only = bank.vote_only_bank(); const CHUNK_SIZE: usize = 128; @@ -493,7 +492,6 @@ impl SchedulerController { .filter_map(|packet| { packet .build_sanitized_transaction( - feature_set, vote_only, bank.as_ref(), bank.get_reserved_account_keys(), diff --git a/core/src/banking_stage/unprocessed_packet_batches.rs b/core/src/banking_stage/unprocessed_packet_batches.rs index ebb91773c49923..2bec44dbd0ea5e 100644 --- a/core/src/banking_stage/unprocessed_packet_batches.rs +++ b/core/src/banking_stage/unprocessed_packet_batches.rs @@ -316,7 +316,6 @@ mod tests { transaction::{SimpleAddressLoader, Transaction}, }, solana_vote_program::vote_transaction, - std::sync::Arc, }; fn simple_deserialized_packet() -> DeserializedPacket { @@ -465,7 +464,6 @@ mod tests { #[test] fn test_transaction_from_deserialized_packet() { - use solana_sdk::feature_set::FeatureSet; let keypair = Keypair::new(); let transfer_tx = system_transaction::transfer(&keypair, &keypair.pubkey(), 1, Hash::default()); @@ -488,7 +486,6 @@ mod tests { let mut votes_only = false; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), @@ -499,7 +496,6 @@ mod tests { votes_only = true; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), @@ -519,7 +515,6 @@ mod tests { let mut votes_only = false; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), @@ -530,7 +525,6 @@ mod tests { votes_only = true; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), @@ -550,7 +544,6 @@ mod tests { let mut votes_only = false; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), @@ -561,7 +554,6 @@ mod tests { votes_only = true; let txs = packet_vector.iter().filter_map(|tx| { tx.immutable_section().build_sanitized_transaction( - &Arc::new(FeatureSet::default()), votes_only, SimpleAddressLoader::Disabled, &ReservedAccountKeys::empty_key_set(), diff --git a/core/src/banking_stage/unprocessed_transaction_storage.rs b/core/src/banking_stage/unprocessed_transaction_storage.rs index dd429cdc03e9f0..bc2dec2a82c7c1 100644 --- a/core/src/banking_stage/unprocessed_transaction_storage.rs +++ b/core/src/banking_stage/unprocessed_transaction_storage.rs @@ -155,7 +155,6 @@ fn consume_scan_should_process_packet( // Try to sanitize the packet let (maybe_sanitized_transaction, sanitization_time_us) = measure_us!(packet .build_sanitized_transaction( - &bank.feature_set, bank.vote_only_bank(), bank, bank.get_reserved_account_keys(), @@ -775,7 +774,6 @@ impl ThreadLocalUnprocessedPackets { .filter_map(|(packet_index, deserialized_packet)| { deserialized_packet .build_sanitized_transaction( - &bank.feature_set, bank.vote_only_bank(), bank, bank.get_reserved_account_keys(),