fix: add self_program_id check for public execution

This commit is contained in:
Moudy 2026-04-02 20:22:55 +02:00
parent 531381e023
commit c9aa4d48c7

View File

@ -184,6 +184,12 @@ impl PublicTransaction {
);
}
// Verify that the program output's self_program_id matches the expected program ID.
ensure!(
program_output.self_program_id == chained_call.program_id,
NssaError::InvalidProgramBehavior
);
// Verify execution corresponds to a well-behaved program.
// See the # Programs section for the definition of the `validate_execution` method.
ensure!(