* Add address lookup table program (#21616)
* Add address lookup table program
* feedback
(cherry picked from commit 9b41ddd9ba
)
# Conflicts:
# runtime/Cargo.toml
* resolve conflicts
Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
@ -34,6 +34,7 @@ rayon = "1.5.1"
|
||||
regex = "1.5.4"
|
||||
serde = { version = "1.0.130", features = ["rc"] }
|
||||
serde_derive = "1.0.103"
|
||||
solana-address-lookup-table-program = { path = "../programs/address-lookup-table", version = "=1.9.0" }
|
||||
solana-config-program = { path = "../programs/config", version = "=1.9.0" }
|
||||
solana-compute-budget-program = { path = "../programs/compute-budget", version = "=1.9.0" }
|
||||
solana-frozen-abi = { path = "../frozen-abi", version = "=1.9.0" }
|
||||
|
@ -121,7 +121,7 @@ use {
|
||||
slot_hashes::SlotHashes,
|
||||
slot_history::SlotHistory,
|
||||
system_transaction,
|
||||
sysvar::{self},
|
||||
sysvar::{self, Sysvar, SysvarId},
|
||||
timing::years_as_slots,
|
||||
transaction::{
|
||||
Result, SanitizedTransaction, Transaction, TransactionError,
|
||||
@ -1898,6 +1898,18 @@ impl Bank {
|
||||
});
|
||||
}
|
||||
|
||||
pub fn set_sysvar_for_tests<T>(&self, sysvar: &T)
|
||||
where
|
||||
T: Sysvar + SysvarId,
|
||||
{
|
||||
self.update_sysvar_account(&T::id(), |account| {
|
||||
create_account(
|
||||
sysvar,
|
||||
self.inherit_specially_retained_account_fields(account),
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
fn update_slot_history(&self) {
|
||||
self.update_sysvar_account(&sysvar::slot_history::id(), |account| {
|
||||
let mut slot_history = account
|
||||
|
@ -172,6 +172,15 @@ fn feature_builtins() -> Vec<(Builtin, Pubkey, ActivationType)> {
|
||||
feature_set::prevent_calling_precompiles_as_programs::id(),
|
||||
ActivationType::RemoveProgram,
|
||||
),
|
||||
(
|
||||
Builtin::new(
|
||||
"address_lookup_table_program",
|
||||
solana_address_lookup_table_program::id(),
|
||||
solana_address_lookup_table_program::processor::process_instruction,
|
||||
),
|
||||
feature_set::versioned_tx_message_enabled::id(),
|
||||
ActivationType::NewProgram,
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user