Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion svm/src/access_permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ impl ExecutedTransaction {
self.execution_details.status = Err(TransactionError::InvalidWritableAccount);
let logs = self.execution_details.log_messages.get_or_insert_default();
logs.push(format!(
"Program log: Account {i}:{offender} was illegally used as writeable"
"Program log: Account {i}: {offender} was illegally used as writable"
));
logs.push(
"Program Magic11111111111111111111111111111111111111 failed: InvalidWritableAccount"
.to_string(),
);
Comment thread
GabrielePicco marked this conversation as resolved.
}
}
}
Expand Down Expand Up @@ -192,6 +196,16 @@ mod tests {
tx.execution_details.status,
Err(TransactionError::InvalidWritableAccount)
);
assert_eq!(
tx.execution_details.log_messages.as_ref().unwrap(),
&vec![
format!(
"Program log: Account 1: {writable} was illegally used as writable"
),
"Program Magic11111111111111111111111111111111111111 failed: InvalidWritableAccount"
.to_string(),
]
);
}

#[test]
Expand Down
Loading