remove payer from vote instructions (#4475)

This commit is contained in:
Rob Walker
2019-05-31 11:45:17 -07:00
committed by GitHub
parent 9670788bf5
commit 028e111fbc
5 changed files with 41 additions and 58 deletions

View File

@@ -101,14 +101,10 @@ mod tests {
let votes = (0..MAX_RECENT_VOTES)
.map(|i| Vote::new(i as u64, Hash::default()))
.collect::<Vec<_>>();
let vote_ix = vote_instruction::vote(
&node_keypair.pubkey(),
&vote_keypair.pubkey(),
&vote_keypair.pubkey(),
votes,
);
let vote_ix = vote_instruction::vote(&vote_keypair.pubkey(), &vote_keypair.pubkey(), votes);
let mut vote_tx = Transaction::new_with_payer(vec![vote_ix], Some(&node_keypair.pubkey()));
let mut vote_tx = Transaction::new_unsigned_instructions(vec![vote_ix]);
vote_tx.partial_sign(&[&node_keypair], Hash::default());
vote_tx.partial_sign(&[&vote_keypair], Hash::default());

View File

@@ -333,13 +333,14 @@ impl ReplayStage {
// Send our last few votes along with the new one
let vote_ix = vote_instruction::vote(
&node_keypair.pubkey(),
&vote_account,
&voting_keypair.pubkey(),
locktower.recent_votes(),
);
let mut vote_tx = Transaction::new_unsigned_instructions(vec![vote_ix]);
let mut vote_tx =
Transaction::new_with_payer(vec![vote_ix], Some(&node_keypair.pubkey()));;
let blockhash = bank.last_blockhash();
vote_tx.partial_sign(&[node_keypair.as_ref()], blockhash);
vote_tx.partial_sign(&[voting_keypair.as_ref()], blockhash);