Use Bank::add_instruction_processor to bypass manual build step
This commit is contained in:
parent
2f1b0bf4f5
commit
5d4624e75f
|
@ -1932,7 +1932,11 @@ mod tests {
|
||||||
let (mut genesis_block, _) =
|
let (mut genesis_block, _) =
|
||||||
GenesisBlock::new_with_leader(500, &bootstrap_leader.pubkey(), 100);
|
GenesisBlock::new_with_leader(500, &bootstrap_leader.pubkey(), 100);
|
||||||
genesis_block.bootstrap_leader_vote_account_id = voting_keypair.pubkey();
|
genesis_block.bootstrap_leader_vote_account_id = voting_keypair.pubkey();
|
||||||
let bank = Bank::new(&genesis_block);
|
let mut bank = Bank::new(&genesis_block);
|
||||||
|
bank.add_instruction_processor(
|
||||||
|
solana_vote_api::id(),
|
||||||
|
vote_instruction::process_instruction,
|
||||||
|
);
|
||||||
let instructions = vote_instruction::vote(&voting_keypair.pubkey(), Vote::new(1));
|
let instructions = vote_instruction::vote(&voting_keypair.pubkey(), Vote::new(1));
|
||||||
let transaction = Transaction::new_signed_instructions(
|
let transaction = Transaction::new_signed_instructions(
|
||||||
&[&voting_keypair],
|
&[&voting_keypair],
|
||||||
|
|
Loading…
Reference in New Issue