Account->AccountSharedData (#15691)
This commit is contained in:
committed by
GitHub
parent
61c7ce857e
commit
8a3135d17b
@@ -19,7 +19,7 @@ use solana_ledger::{
|
||||
};
|
||||
use solana_runtime::hardened_unpack::MAX_GENESIS_ARCHIVE_UNPACKED_SIZE;
|
||||
use solana_sdk::{
|
||||
account::Account,
|
||||
account::AccountSharedData,
|
||||
clock,
|
||||
epoch_schedule::EpochSchedule,
|
||||
fee_calculator::FeeRateGovernor,
|
||||
@@ -82,7 +82,7 @@ pub fn load_genesis_accounts(file: &str, genesis_config: &mut GenesisConfig) ->
|
||||
)
|
||||
})?;
|
||||
|
||||
let mut account = Account::new(account_details.balance, 0, &owner_program_id);
|
||||
let mut account = AccountSharedData::new(account_details.balance, 0, &owner_program_id);
|
||||
if account_details.data != "~" {
|
||||
account.data = base64::decode(account_details.data.as_str()).map_err(|err| {
|
||||
io::Error::new(
|
||||
@@ -534,7 +534,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
|
||||
genesis_config.add_account(
|
||||
*identity_pubkey,
|
||||
Account::new(bootstrap_validator_lamports, 0, &system_program::id()),
|
||||
AccountSharedData::new(bootstrap_validator_lamports, 0, &system_program::id()),
|
||||
);
|
||||
|
||||
let vote_account = vote_state::create_account_with_authorized(
|
||||
@@ -568,7 +568,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
if let Some(faucet_pubkey) = faucet_pubkey {
|
||||
genesis_config.add_account(
|
||||
faucet_pubkey,
|
||||
Account::new(faucet_lamports, 0, &system_program::id()),
|
||||
AccountSharedData::new(faucet_lamports, 0, &system_program::id()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
});
|
||||
genesis_config.add_account(
|
||||
address,
|
||||
Account {
|
||||
AccountSharedData {
|
||||
lamports: genesis_config.rent.minimum_balance(program_data.len()),
|
||||
data: program_data,
|
||||
executable: true,
|
||||
|
Reference in New Issue
Block a user