Store versioned transactions in the ledger, disabled by default (#19139)
* Add support for versioned transactions, but disable by default * merge conflicts * trent's feedback * bump Cargo.lock * Fix transaction error encoding * Rename legacy_transaction method * cargo clippy * Clean up casts, int arithmetic, and unused methods * Check for duplicates in sanitized message conversion * fix clippy * fix new test * Fix bpf conditional compilation for message module
This commit is contained in:
@@ -1837,8 +1837,9 @@ mod tests {
|
||||
genesis_config::create_genesis_config,
|
||||
signature::{Keypair, Signer},
|
||||
system_transaction,
|
||||
transaction::SanitizedTransaction,
|
||||
};
|
||||
use std::mem::size_of;
|
||||
use std::{convert::TryFrom, mem::size_of};
|
||||
|
||||
#[test]
|
||||
fn test_serialize_snapshot_data_file_under_limit() {
|
||||
@@ -2910,12 +2911,13 @@ mod tests {
|
||||
|
||||
let slot = slot + 1;
|
||||
let bank2 = Arc::new(Bank::new_from_parent(&bank1, &collector, slot));
|
||||
let tx = system_transaction::transfer(
|
||||
let tx = SanitizedTransaction::try_from(system_transaction::transfer(
|
||||
&key1,
|
||||
&key2.pubkey(),
|
||||
lamports_to_transfer,
|
||||
bank2.last_blockhash(),
|
||||
);
|
||||
))
|
||||
.unwrap();
|
||||
let fee = bank2
|
||||
.get_fee_for_message(&bank2.last_blockhash(), tx.message())
|
||||
.unwrap();
|
||||
|
Reference in New Issue
Block a user