add solana_name_id, reassociate names with modules, modularize id tests (#4580)

This commit is contained in:
Rob Walker
2019-06-06 19:27:49 -07:00
committed by GitHub
parent 191483f4ee
commit fd9fd43e83
20 changed files with 199 additions and 194 deletions

View File

@ -1,13 +1,5 @@
use crate::pubkey::Pubkey;
const SYSTEM_PROGRAM_ID: [u8; 32] = [
const ID: [u8; 32] = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
];
pub fn id() -> Pubkey {
Pubkey::new(&SYSTEM_PROGRAM_ID)
}
pub fn check_id(program_id: &Pubkey) -> bool {
program_id.as_ref() == SYSTEM_PROGRAM_ID
}
crate::solana_name_id!(ID, "11111111111111111111111111111111");