11//! General purpose TransactionMessage utility functions
22
33use {
4- crate :: tools:: small_vec:: SmallVec ,
54 borsh:: { BorshDeserialize , BorshSerialize } ,
65 solana_program:: pubkey:: Pubkey ,
76} ;
@@ -16,12 +15,12 @@ pub struct TransactionMessage {
1615 /// The number of writable non-signer pubkeys in the account_keys vec.
1716 pub num_writable_non_signers : u8 ,
1817 /// The list of unique account public keys (including program IDs) that will be used in the provided instructions.
19- pub account_keys : SmallVec < u8 , Pubkey > ,
18+ pub account_keys : Vec < Pubkey > ,
2019 /// The list of instructions to execute.
21- pub instructions : SmallVec < u8 , CompiledInstruction > ,
20+ pub instructions : Vec < CompiledInstruction > ,
2221 /// List of address table lookups used to load additional accounts
2322 /// for this transaction.
24- pub address_table_lookups : SmallVec < u8 , MessageAddressTableLookup > ,
23+ pub address_table_lookups : Vec < MessageAddressTableLookup > ,
2524}
2625
2726/// Concise serialization schema for instructions that make up transaction.
@@ -30,9 +29,9 @@ pub struct CompiledInstruction {
3029 /// Indices of the program_id in tx's account_keys
3130 pub program_id_index : u8 ,
3231 /// Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction.
33- pub account_indexes : SmallVec < u8 , u8 > ,
32+ pub account_indexes : Vec < u8 > ,
3433 /// Instruction data.
35- pub data : SmallVec < u16 , u8 > ,
34+ pub data : Vec < u8 > ,
3635}
3736
3837/// Address table lookups describe an on-chain address lookup table to use
@@ -42,7 +41,7 @@ pub struct MessageAddressTableLookup {
4241 /// Address lookup table account key
4342 pub account_key : Pubkey ,
4443 /// List of indexes used to load writable account addresses
45- pub writable_indexes : SmallVec < u8 , u8 > ,
44+ pub writable_indexes : Vec < u8 > ,
4645 /// List of indexes used to load readonly account addresses
47- pub readonly_indexes : SmallVec < u8 , u8 > ,
46+ pub readonly_indexes : Vec < u8 > ,
4847}
0 commit comments