AccountSharedData.set_executable (#16836)
This commit is contained in:
committed by
GitHub
parent
3887169db0
commit
69bfbf9e98
@ -17,7 +17,7 @@ use solana_ledger::{
|
|||||||
};
|
};
|
||||||
use solana_runtime::hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE;
|
use solana_runtime::hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
account::{Account, AccountSharedData},
|
account::{Account, AccountSharedData, WritableAccount},
|
||||||
clock,
|
clock,
|
||||||
epoch_schedule::EpochSchedule,
|
epoch_schedule::EpochSchedule,
|
||||||
fee_calculator::FeeRateGovernor,
|
fee_calculator::FeeRateGovernor,
|
||||||
@ -91,7 +91,7 @@ pub fn load_genesis_accounts(file: &str, genesis_config: &mut GenesisConfig) ->
|
|||||||
})?,
|
})?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
account.executable = account_details.executable;
|
account.set_executable(account_details.executable);
|
||||||
lamports += account.lamports;
|
lamports += account.lamports;
|
||||||
genesis_config.add_account(pubkey, account);
|
genesis_config.add_account(pubkey, account);
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ fn process_loader_upgradeable_instruction(
|
|||||||
program.set_state(&UpgradeableLoaderState::Program {
|
program.set_state(&UpgradeableLoaderState::Program {
|
||||||
programdata_address: *programdata.unsigned_key(),
|
programdata_address: *programdata.unsigned_key(),
|
||||||
})?;
|
})?;
|
||||||
program.try_account_ref_mut()?.executable = true;
|
program.try_account_ref_mut()?.set_executable(true);
|
||||||
|
|
||||||
// Drain the Buffer account back to the payer
|
// Drain the Buffer account back to the payer
|
||||||
payer
|
payer
|
||||||
@ -695,7 +695,7 @@ fn process_loader_instruction(
|
|||||||
let keyed_accounts = invoke_context.get_keyed_accounts()?;
|
let keyed_accounts = invoke_context.get_keyed_accounts()?;
|
||||||
let program = keyed_account_at_index(keyed_accounts, 0)?;
|
let program = keyed_account_at_index(keyed_accounts, 0)?;
|
||||||
invoke_context.add_executor(program.unsigned_key(), executor);
|
invoke_context.add_executor(program.unsigned_key(), executor);
|
||||||
program.try_account_ref_mut()?.executable = true;
|
program.try_account_ref_mut()?.set_executable(true);
|
||||||
ic_msg!(
|
ic_msg!(
|
||||||
invoke_context,
|
invoke_context,
|
||||||
"Finalized account {:?}",
|
"Finalized account {:?}",
|
||||||
|
Reference in New Issue
Block a user