Skip to content

Commit

Permalink
Remove priority from vote transactions (solana-labs#28030)
Browse files Browse the repository at this point in the history
vote transactions have same priority fee
  • Loading branch information
tao-stones authored Sep 24, 2022
1 parent f642428 commit e51cf46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/immutable_deserialized_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ impl ImmutableDeserializedPacket {
let is_simple_vote = packet.meta.is_simple_vote_tx();

// drop transaction if prioritization fails.
let priority_details = priority_details
let mut priority_details = priority_details
.or_else(|| sanitized_transaction.get_transaction_priority_details())
.ok_or(DeserializedPacketError::PrioritizationFailure)?;

// set priority to zero for vote transactions
if is_simple_vote {
priority_details.priority = 0;
};

Ok(Self {
original_packet: packet,
transaction: sanitized_transaction,
Expand Down

0 comments on commit e51cf46

Please sign in to comment.