Count compute units even when transaction errors (backport #22182) (#22199)

* Count compute units even when transaction errors (#22182)

(cherry picked from commit d06e6c7425)

# Conflicts:
#	program-runtime/src/invoke_context.rs
#	runtime/src/cost_model.rs
#	runtime/src/message_processor.rs

* Resolve conflicts

Co-authored-by: carllin <carl@solana.com>
This commit is contained in:
mergify[bot]
2021-12-31 21:14:00 +00:00
committed by GitHub
parent c6ab915668
commit 113d261a2c
7 changed files with 349 additions and 61 deletions

View File

@ -322,6 +322,7 @@ impl solana_sdk::program_stubs::SyscallStubs for SyscallStubs {
&account_indices,
&caller_privileges,
)
.result
.map_err(|err| ProgramError::try_from(err).unwrap_or_else(|err| panic!("{}", err)))?;
// Copy writeable account modifications back into the caller's AccountInfos