Allow the same account to be passed multiple times to a single instruction (#7795)

This commit is contained in:
Jack May
2020-01-22 09:11:56 -08:00
committed by GitHub
parent d854e90c23
commit 023074650f
33 changed files with 1392 additions and 765 deletions

View File

@@ -72,7 +72,7 @@ pub fn invoke_entrypoint(
) -> Result<(), InstructionError> {
// dispatch it
let (names, params) = keyed_accounts.split_at_mut(1);
let name_vec = &names[0].account.data;
let name_vec = &names[0].try_account_ref()?.data;
if let Some(entrypoint) = symbol_cache.read().unwrap().get(name_vec) {
unsafe {
return entrypoint(program_id, params, instruction_data);