change function name

This commit is contained in:
Sergio Chouhy 2025-07-20 22:02:16 -03:00
parent 87dc9d9d3e
commit 734206bf73
3 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ pub fn bytes_to_words(bytes: &[u8; 32]) -> [u32; 8] {
/// Verifies that a program public execution didn't break the chain's rules.
/// `input_accounts` are the accounts provided as inputs to the program.
/// `output_accounts` are the accounts post states after execution of the program
pub fn inputs_outputs_preserve_invariants(
pub fn post_execution_consistency_checks(
input_accounts: &[Account],
output_accounts: &[Account],
program_id: ProgramId,

View File

@ -1,4 +1,4 @@
use core::{account::Account, inputs_outputs_preserve_invariants, types::Address};
use core::{account::Account, post_execution_consistency_checks, types::Address};
use crate::mocked_components::sequencer::error::Error;
@ -22,7 +22,7 @@ impl MockedSequencer {
nssa::execute_onchain::<P>(&input_accounts, instruction_data).map_err(|_| Error::BadInput)?;
// Assert accounts pre- and post-states preserve chains invariants
if !inputs_outputs_preserve_invariants(&input_accounts, &program_output.accounts_post, P::PROGRAM_ID) {
if !post_execution_consistency_checks(&input_accounts, &program_output.accounts_post, P::PROGRAM_ID) {
return Err(Error::BadInput);
}

View File

@ -1,5 +1,5 @@
use core::{
compute_nullifier, hash, inputs_outputs_preserve_invariants, is_in_tree,
compute_nullifier, hash, is_in_tree, post_execution_consistency_checks,
types::{Nonce, PrivacyExecutionOutput, ProgramId, ProgramOutput},
visibility::AccountVisibility,
};
@ -52,7 +52,7 @@ fn main() {
env::verify(program_id, &to_vec(&inner_program_output).unwrap()).unwrap();
// Assert accounts pre- and post-states preserve chains invariants
assert!(inputs_outputs_preserve_invariants(
assert!(post_execution_consistency_checks(
&inner_program_output.accounts_pre,
&inner_program_output.accounts_post,
program_id