Skip to content

Commit

Permalink
TEST: clean up lamps per sig tests
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe committed Oct 30, 2024
1 parent 4a0e5ba commit dd1548a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions svm/src/transaction_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand Down Expand Up @@ -2131,7 +2131,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand Down Expand Up @@ -2169,6 +2169,7 @@ mod tests {

#[test]
fn test_validate_transaction_fee_payer_not_found() {
let lamports_per_signature = 5000;
let message =
new_unchecked_sanitized_message(Message::new(&[], Some(&Pubkey::new_unique())));

Expand All @@ -2180,7 +2181,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand All @@ -2194,6 +2195,7 @@ mod tests {

#[test]
fn test_validate_transaction_fee_payer_insufficient_funds() {
let lamports_per_signature = 5000;
let message =
new_unchecked_sanitized_message(Message::new(&[], Some(&Pubkey::new_unique())));
let fee_payer_address = message.fee_payer();
Expand All @@ -2212,7 +2214,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand Down Expand Up @@ -2249,7 +2251,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand All @@ -2265,6 +2267,7 @@ mod tests {

#[test]
fn test_validate_transaction_fee_payer_invalid() {
let lamports_per_signature = 5000;
let message =
new_unchecked_sanitized_message(Message::new(&[], Some(&Pubkey::new_unique())));
let fee_payer_address = message.fee_payer();
Expand All @@ -2283,7 +2286,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand All @@ -2297,6 +2300,7 @@ mod tests {

#[test]
fn test_validate_transaction_fee_payer_invalid_compute_budget() {
let lamports_per_signature = 5000;
let message = new_unchecked_sanitized_message(Message::new(
&[
ComputeBudgetInstruction::set_compute_unit_limit(2000u32),
Expand All @@ -2313,7 +2317,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand Down Expand Up @@ -2456,7 +2460,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&feature_set,
&FeeStructure::default(),
Expand Down Expand Up @@ -2514,7 +2518,7 @@ mod tests {
&message,
CheckedTransactionDetails {
nonce: None,
lamports_per_signature: 5000,
lamports_per_signature,
},
&FeatureSet::default(),
&FeeStructure::default(),
Expand Down

0 comments on commit dd1548a

Please sign in to comment.