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:
Justin Starry
2021-08-17 15:17:56 -07:00
committed by GitHub
parent 098e2b2de3
commit c50b01cb60
47 changed files with 2373 additions and 1049 deletions

View File

@@ -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();