Prevent add/subtract from executable account (#9132)

This commit is contained in:
Jack May
2020-03-27 16:43:25 -07:00
committed by GitHub
parent 4a8b1d9b2c
commit e2491c6322
3 changed files with 118 additions and 45 deletions

View File

@ -65,8 +65,8 @@ pub enum InstructionError {
#[error("instruction modified data of an account it does not own")]
ExternalAccountDataModified,
/// Read-only account modified lamports
#[error("instruction changed balance of a read-only account")]
/// Read-only account's lamports modified
#[error("instruction changed the balance of a read-only account")]
ReadonlyLamportChange,
/// Read-only account's data was modified
@ -126,6 +126,10 @@ pub enum InstructionError {
/// Executable account's data was modified
#[error("instruction changed executable accounts data")]
ExecutableDataModified,
/// Executable account's lamports modified
#[error("instruction changed the balance of a executable account")]
ExecutableLamportChange,
}
impl InstructionError {