Refactor: move simple vote parsing to runtime (#22537)

This commit is contained in:
Justin Starry
2022-01-20 10:39:21 +08:00
committed by GitHub
parent d343713f61
commit 7f20c6149e
16 changed files with 239 additions and 220 deletions

View File

@ -61,6 +61,7 @@ impl SanitizedTransaction {
};
let is_simple_vote_tx = is_simple_vote_tx.unwrap_or_else(|| {
// TODO: Move to `vote_parser` runtime module
let mut ix_iter = message.program_instructions_iter();
ix_iter.next().map(|(program_id, _ix)| program_id) == Some(&crate::vote::program::id())
});