Refactor: move simple vote parsing to runtime (#22537)
This commit is contained in:
@@ -2,10 +2,10 @@ use {
|
||||
crate::{
|
||||
bank::{Bank, TransactionResults},
|
||||
genesis_utils::{self, GenesisConfigInfo, ValidatorVoteKeypairs},
|
||||
vote_parser,
|
||||
vote_sender_types::ReplayVoteSender,
|
||||
},
|
||||
solana_sdk::{pubkey::Pubkey, signature::Signer, transaction::SanitizedTransaction},
|
||||
solana_vote_program::vote_transaction,
|
||||
};
|
||||
|
||||
pub fn setup_bank_and_vote_pubkeys_for_tests(
|
||||
@@ -45,9 +45,7 @@ pub fn find_and_send_votes(
|
||||
.zip(execution_results.iter())
|
||||
.for_each(|(tx, result)| {
|
||||
if tx.is_simple_vote_transaction() && result.was_executed_successfully() {
|
||||
if let Some(parsed_vote) =
|
||||
vote_transaction::parse_sanitized_vote_transaction(tx)
|
||||
{
|
||||
if let Some(parsed_vote) = vote_parser::parse_sanitized_vote_transaction(tx) {
|
||||
if parsed_vote.1.last_voted_slot().is_some() {
|
||||
let _ = vote_sender.send(parsed_vote);
|
||||
}
|
||||
|
Reference in New Issue
Block a user