sigverify to identify and mark simple vote transaction

This commit is contained in:
Tao Zhu
2021-09-20 23:00:33 -05:00
committed by Justin Starry
parent f220386917
commit 198929fe8b
6 changed files with 203 additions and 27 deletions

View File

@@ -1,11 +1,14 @@
use solana_sdk::{
hash::Hash,
instruction::CompiledInstruction,
signature::{Keypair, Signer},
stake,
system_instruction::SystemInstruction,
system_program, system_transaction,
transaction::Transaction,
use {
solana_sdk::{
hash::Hash,
instruction::CompiledInstruction,
signature::{Keypair, Signer},
stake,
system_instruction::SystemInstruction,
system_program, system_transaction,
transaction::Transaction,
},
solana_vote_program::vote_transaction,
};
pub fn test_tx() -> Transaction {
@@ -40,3 +43,16 @@ pub fn test_multisig_tx() -> Transaction {
instructions,
)
}
pub fn vote_tx() -> Transaction {
let keypair = Keypair::new();
vote_transaction::new_vote_transaction(
vec![2],
Hash::default(),
Hash::default(),
&keypair,
&keypair,
&keypair,
None,
)
}