Make default programs static (#9717)
This commit is contained in:
@ -12,7 +12,7 @@ fn test_program_native_noop() {
|
||||
let (genesis_config, alice_keypair) = create_genesis_config(50);
|
||||
let program_id = Pubkey::new_rand();
|
||||
let bank = Bank::new(&genesis_config);
|
||||
bank.register_native_instruction_processor("solana_noop_program", &program_id);
|
||||
bank.add_native_program("solana_noop_program", &program_id);
|
||||
|
||||
// Call user program
|
||||
let instruction = create_invoke_instruction(alice_keypair.pubkey(), program_id, &1u8);
|
||||
|
@ -100,13 +100,10 @@ fn test_stake_create_and_split_single_signature() {
|
||||
solana_logger::setup();
|
||||
|
||||
let GenesisConfigInfo {
|
||||
mut genesis_config,
|
||||
genesis_config,
|
||||
mint_keypair: staker_keypair,
|
||||
..
|
||||
} = create_genesis_config_with_leader(100_000_000_000, &Pubkey::new_rand(), 1_000_000);
|
||||
genesis_config
|
||||
.native_instruction_processors
|
||||
.push(solana_stake_program::solana_stake_program!());
|
||||
|
||||
let staker_pubkey = staker_keypair.pubkey();
|
||||
|
||||
@ -166,13 +163,10 @@ fn test_stake_account_lifetime() {
|
||||
let identity_pubkey = identity_keypair.pubkey();
|
||||
|
||||
let GenesisConfigInfo {
|
||||
mut genesis_config,
|
||||
genesis_config,
|
||||
mint_keypair,
|
||||
..
|
||||
} = create_genesis_config_with_leader(100_000_000_000, &Pubkey::new_rand(), 1_000_000);
|
||||
genesis_config
|
||||
.native_instruction_processors
|
||||
.push(solana_stake_program::solana_stake_program!());
|
||||
let bank = Bank::new(&genesis_config);
|
||||
let mint_pubkey = mint_keypair.pubkey();
|
||||
let mut bank = Arc::new(bank);
|
||||
@ -403,13 +397,10 @@ fn test_create_stake_account_from_seed() {
|
||||
let identity_pubkey = identity_keypair.pubkey();
|
||||
|
||||
let GenesisConfigInfo {
|
||||
mut genesis_config,
|
||||
genesis_config,
|
||||
mint_keypair,
|
||||
..
|
||||
} = create_genesis_config_with_leader(100_000_000_000, &Pubkey::new_rand(), 1_000_000);
|
||||
genesis_config
|
||||
.native_instruction_processors
|
||||
.push(solana_stake_program::solana_stake_program!());
|
||||
let bank = Bank::new(&genesis_config);
|
||||
let mint_pubkey = mint_keypair.pubkey();
|
||||
let bank = Arc::new(bank);
|
||||
|
@ -45,7 +45,7 @@ fn test_account_owner() {
|
||||
} = create_genesis_config(1000);
|
||||
let mut bank = Bank::new(&genesis_config);
|
||||
let mint_pubkey = mint_keypair.pubkey();
|
||||
bank.add_instruction_processor(id(), process_instruction);
|
||||
bank.add_static_program("storage_program", id(), process_instruction);
|
||||
let bank = Arc::new(bank);
|
||||
let bank_client = BankClient::new_shared(&bank);
|
||||
|
||||
|
Reference in New Issue
Block a user