@@ -138,8 +138,11 @@ pub fn update_node(
|
||||
authorized_voter_pubkey: &Pubkey,
|
||||
node_pubkey: &Pubkey,
|
||||
) -> Instruction {
|
||||
let account_metas =
|
||||
vec![AccountMeta::new(*vote_pubkey, false)].with_signer(authorized_voter_pubkey);
|
||||
let account_metas = vec![
|
||||
AccountMeta::new(*vote_pubkey, false),
|
||||
AccountMeta::new_readonly(sysvar::clock::id(), false),
|
||||
]
|
||||
.with_signer(authorized_voter_pubkey);
|
||||
|
||||
Instruction::new(
|
||||
id(),
|
||||
@@ -205,9 +208,12 @@ pub fn process_instruction(
|
||||
&signers,
|
||||
&Clock::from_keyed_account(next_keyed_account(keyed_accounts)?)?,
|
||||
),
|
||||
VoteInstruction::UpdateNode(node_pubkey) => {
|
||||
vote_state::update_node(me, &node_pubkey, &signers)
|
||||
}
|
||||
VoteInstruction::UpdateNode(node_pubkey) => vote_state::update_node(
|
||||
me,
|
||||
&node_pubkey,
|
||||
&signers,
|
||||
&Clock::from_keyed_account(next_keyed_account(keyed_accounts)?)?,
|
||||
),
|
||||
VoteInstruction::Vote(vote) => {
|
||||
inc_new_counter_info!("vote-native", 1);
|
||||
vote_state::process_vote(
|
||||
|
Reference in New Issue
Block a user