Skip to main content

check_writable_coherence

Function check_writable_coherence 

Source
pub fn check_writable_coherence(
    accounts: &[AccountView],
    program_id: &Address,
) -> ProgramResult
Expand description

Validate that every writable account in the slice is also a signer OR is owned by our program.

Prevents fee-drain attacks where an attacker passes a writable account they don’t own, hoping the program modifies it.