Move vote_program out of src/

This commit is contained in:
Michael Vines
2018-12-04 07:45:32 -08:00
parent a594f56c02
commit ea6e042a6f
20 changed files with 241 additions and 193 deletions

View File

@@ -6,7 +6,6 @@ use solana_sdk::pubkey::Pubkey;
use solana_sdk::system_program;
use solana_sdk::transaction::Transaction;
use storage_program;
use vote_program;
/// Reasons the runtime might have rejected a transaction.
#[derive(Debug, PartialEq, Eq, Clone)]
@@ -16,9 +15,7 @@ pub enum RuntimeError {
}
pub fn is_legacy_program(program_id: &Pubkey) -> bool {
budget_program::check_id(program_id)
|| storage_program::check_id(program_id)
|| vote_program::check_id(program_id)
budget_program::check_id(program_id) || storage_program::check_id(program_id)
}
/// Process an instruction
@@ -39,8 +36,6 @@ fn process_instruction(
budget_program::process(&tx, instruction_index, program_accounts)?;
} else if storage_program::check_id(&program_id) {
storage_program::process(&tx, instruction_index, program_accounts)?;
} else if vote_program::check_id(&program_id) {
vote_program::process(&tx, instruction_index, program_accounts)?;
} else {
unreachable!();
};