nit: describe the root program id (#8621)

This commit is contained in:
Jack May
2020-03-04 08:55:01 -08:00
committed by GitHub
parent 1cc7131bb7
commit 642720a2fe
2 changed files with 5 additions and 328 deletions

View File

@ -200,12 +200,11 @@ impl MessageProcessor {
assert!(
keyed_accounts[0].try_account_ref()?.executable,
"loader not executable"
"root program not executable"
);
let loader_id = keyed_accounts[0].unsigned_key();
let root_program_id = keyed_accounts[0].unsigned_key();
for (id, process_instruction) in &self.instruction_processors {
if id == loader_id {
if id == root_program_id {
return process_instruction(&program_id, &keyed_accounts[1..], &instruction.data);
}
}