From dd1548a924d8e65fc2a0c0385d6e37de9869d662 Mon Sep 17 00:00:00 2001 From: hana <81144685+2501babe@users.noreply.github.com> Date: Wed, 30 Oct 2024 03:01:17 -0700 Subject: [PATCH] TEST: clean up lamps per sig tests --- svm/src/transaction_processor.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/svm/src/transaction_processor.rs b/svm/src/transaction_processor.rs index 68a48b96720247..6d024d170e39ca 100644 --- a/svm/src/transaction_processor.rs +++ b/svm/src/transaction_processor.rs @@ -2054,7 +2054,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -2131,7 +2131,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -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()))); @@ -2180,7 +2181,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -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(); @@ -2212,7 +2214,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -2249,7 +2251,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -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(); @@ -2283,7 +2286,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -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), @@ -2313,7 +2317,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(), @@ -2456,7 +2460,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &feature_set, &FeeStructure::default(), @@ -2514,7 +2518,7 @@ mod tests { &message, CheckedTransactionDetails { nonce: None, - lamports_per_signature: 5000, + lamports_per_signature, }, &FeatureSet::default(), &FeeStructure::default(),