Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958)

This commit is contained in:
Jack May
2020-01-24 10:54:26 -08:00
committed by GitHub
parent d400a64b9a
commit 34ed93d57c
12 changed files with 339 additions and 169 deletions

View File

@ -8,7 +8,7 @@ fn process_instruction(_program_id: &Pubkey, accounts: &mut [AccountInfo], _data
// account 0 is the mint and not owned by this program, any debit of its lamports
// should result in a failed program execution. Test to ensure that this debit
// is seen by the runtime and fails as expected
*accounts[0].lamports -= 1;
*accounts[0].m.borrow_mut().lamports -= 1;
SUCCESS
}