Refactor: Sanitized transaction creation (#23558)
* Refactor: SanitizedTransaction::try_create optionally computes hash * Refactor: Add SimpleAddressLoader
This commit is contained in:
@@ -225,7 +225,8 @@ pub(crate) mod tests {
|
||||
signature::{Keypair, Signature, Signer},
|
||||
system_transaction,
|
||||
transaction::{
|
||||
DisabledAddressLoader, SanitizedTransaction, Transaction, VersionedTransaction,
|
||||
MessageHash, SanitizedTransaction, SimpleAddressLoader, Transaction,
|
||||
VersionedTransaction,
|
||||
},
|
||||
},
|
||||
solana_transaction_status::{
|
||||
@@ -304,14 +305,13 @@ pub(crate) mod tests {
|
||||
Blockstore::open(&ledger_path).expect("Expected to be able to open database ledger");
|
||||
let blockstore = Arc::new(blockstore);
|
||||
|
||||
let message_hash = Hash::new_unique();
|
||||
let transaction = build_test_transaction_legacy();
|
||||
let transaction = VersionedTransaction::from(transaction);
|
||||
let transaction = SanitizedTransaction::try_create(
|
||||
transaction,
|
||||
message_hash,
|
||||
Some(true),
|
||||
&DisabledAddressLoader,
|
||||
MessageHash::Compute,
|
||||
None,
|
||||
SimpleAddressLoader::Disabled,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user