Skip to content

Commit 6523f36

Browse files
committed
remove smallvec dependency
1 parent d07b7c1 commit 6523f36

File tree

4 files changed

+7
-299
lines changed

4 files changed

+7
-299
lines changed

governance/program/src/tools/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ pub mod ephermal_signers;
1313
pub mod executable_transaction_message;
1414

1515
pub mod transaction_message;
16-
17-
pub mod small_vec;

governance/program/src/tools/small_vec.rs

Lines changed: 0 additions & 288 deletions
This file was deleted.

governance/program/src/tools/transaction_message.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! General purpose TransactionMessage utility functions
22
33
use {
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
}

governance/program/tests/program_test/versioned_transaction_ext.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
use solana_sdk::address_lookup_table::AddressLookupTableAccount;
32
use solana_program::instruction::{AccountMeta, Instruction};
43
use solana_program::message::{AccountKeys, CompileError};

0 commit comments

Comments
 (0)