Add account owner to Storage Accounts (#4537)
* Add account owner to Storage Accounts * Fix tests
This commit is contained in:
@ -4,14 +4,18 @@ use solana_sdk::pubkey::Pubkey;
|
||||
use solana_storage_api::storage_contract;
|
||||
|
||||
pub trait GenesisBlockUtil {
|
||||
fn add_storage_program(&mut self, validator_storage_pubkey: &Pubkey);
|
||||
fn add_storage_program(&mut self, validator_pubkey: &Pubkey, validator_storage_pubkey: &Pubkey);
|
||||
}
|
||||
|
||||
impl GenesisBlockUtil for GenesisBlock {
|
||||
fn add_storage_program(&mut self, validator_storage_pubkey: &Pubkey) {
|
||||
fn add_storage_program(
|
||||
&mut self,
|
||||
validator_pubkey: &Pubkey,
|
||||
validator_storage_pubkey: &Pubkey,
|
||||
) {
|
||||
self.accounts.push((
|
||||
*validator_storage_pubkey,
|
||||
storage_contract::create_validator_storage_account(1),
|
||||
storage_contract::create_validator_storage_account(*validator_pubkey, 1),
|
||||
));
|
||||
self.native_instruction_processors
|
||||
.push(solana_storage_program!());
|
||||
|
Reference in New Issue
Block a user