Skip to content

Commit

Permalink
add note about discrepancy between accounts load and sanitize caps (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson authored Jan 12, 2023
1 parent 451fbfe commit 730aa71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/program/src/message/versions/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ impl Message {

// the combined number of static and dynamic account keys must be <= 256
// since account indices are encoded as `u8`
// Note that this is different from the per-transaction account load cap
// as defined in `Bank::get_transaction_account_lock_limit`
let total_account_keys = num_static_account_keys.saturating_add(num_dynamic_account_keys);
if total_account_keys > 256 {
return Err(SanitizeError::IndexOutOfBounds);
Expand Down

0 comments on commit 730aa71

Please sign in to comment.