Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/src/banking_stage/immutable_deserialized_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
};

Expand Down Expand Up @@ -106,7 +105,6 @@ impl ImmutableDeserializedPacket {
// messages.
pub fn build_sanitized_transaction(
&self,
_feature_set: &Arc<feature_set::FeatureSet>,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main change, everything else just a result of this.

votes_only: bool,
address_loader: impl AddressLoader,
reserved_account_keys: &HashSet<Pubkey>,
Expand Down
1 change: 0 additions & 1 deletion core/src/banking_stage/latest_unprocessed_votes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(),
Expand Down
8 changes: 0 additions & 8 deletions core/src/banking_stage/unprocessed_packet_batches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ mod tests {
transaction::{SimpleAddressLoader, Transaction},
},
solana_vote_program::vote_transaction,
std::sync::Arc,
};

fn simple_deserialized_packet() -> DeserializedPacket {
Expand Down Expand Up @@ -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());
Expand All @@ -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(),
Expand All @@ -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(),
Expand All @@ -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(),
Expand All @@ -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(),
Expand All @@ -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(),
Expand All @@ -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(),
Expand Down
2 changes: 0 additions & 2 deletions core/src/banking_stage/unprocessed_transaction_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down