Clean up sanitized tx creation for tests (#21006)
This commit is contained in:
@@ -1191,8 +1191,11 @@ mod tests {
|
||||
message: Message,
|
||||
recent_blockhash: Hash,
|
||||
) -> SanitizedTransaction {
|
||||
SanitizedTransaction::try_from(Transaction::new(from_keypairs, message, recent_blockhash))
|
||||
.unwrap()
|
||||
SanitizedTransaction::from_transaction_for_tests(Transaction::new(
|
||||
from_keypairs,
|
||||
message,
|
||||
recent_blockhash,
|
||||
))
|
||||
}
|
||||
|
||||
fn load_accounts_with_fee_and_rent(
|
||||
@@ -1216,7 +1219,7 @@ mod tests {
|
||||
}
|
||||
|
||||
let ancestors = vec![(0, 0)].into_iter().collect();
|
||||
let sanitized_tx = SanitizedTransaction::try_from(tx).unwrap();
|
||||
let sanitized_tx = SanitizedTransaction::from_transaction_for_tests(tx);
|
||||
accounts.load_accounts(
|
||||
&ancestors,
|
||||
&[sanitized_tx],
|
||||
@@ -2460,7 +2463,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn load_accounts_no_store(accounts: &Accounts, tx: Transaction) -> Vec<TransactionLoadResult> {
|
||||
let tx = SanitizedTransaction::try_from(tx).unwrap();
|
||||
let tx = SanitizedTransaction::from_transaction_for_tests(tx);
|
||||
let rent_collector = RentCollector::default();
|
||||
let mut hash_queue = BlockhashQueue::new(100);
|
||||
hash_queue.register_hash(tx.message().recent_blockhash(), 10);
|
||||
|
Reference in New Issue
Block a user