Skip to content

Commit

Permalink
Casts executable bool to integer when computing account hash (#35373)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Mar 1, 2024
1 parent 59ed049 commit 564a9f7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6142,11 +6142,7 @@ impl AccountsDb {
}

// collect exec_flag, owner, pubkey into buffer to hash
if executable {
buffer.push(1_u8);
} else {
buffer.push(0_u8);
}
buffer.push(executable.into());
buffer.extend_from_slice(owner.as_ref());
buffer.extend_from_slice(pubkey.as_ref());
hasher.update(&buffer);
Expand Down

0 comments on commit 564a9f7

Please sign in to comment.