Use iterated account (#8673)

automerge
This commit is contained in:
Grimes 2020-03-05 13:10:20 -08:00 committed by GitHub
parent 9d667db634
commit 7fad53b112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ pub fn invoke_entrypoint(
let name_vec = &program.try_account_ref()?.data; let name_vec = &program.try_account_ref()?.data;
if let Some(entrypoint) = symbol_cache.read().unwrap().get(name_vec) { if let Some(entrypoint) = symbol_cache.read().unwrap().get(name_vec) {
unsafe { unsafe {
return entrypoint(names[0].unsigned_key(), params, instruction_data); return entrypoint(program.unsigned_key(), params, instruction_data);
} }
} }
let name = match str::from_utf8(name_vec) { let name = match str::from_utf8(name_vec) {
@ -120,7 +120,7 @@ pub fn invoke_entrypoint(
return Err(NativeLoaderError::EntrypointNotFound.into()); return Err(NativeLoaderError::EntrypointNotFound.into());
} }
}; };
let ret = entrypoint(names[0].unsigned_key(), params, instruction_data); let ret = entrypoint(program.unsigned_key(), params, instruction_data);
symbol_cache symbol_cache
.write() .write()
.unwrap() .unwrap()