From 564a9f78a064eff9c78b0edf3735270b5cf4fd14 Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 1 Mar 2024 14:28:28 -0500 Subject: [PATCH] Casts executable bool to integer when computing account hash (#35373) --- accounts-db/src/accounts_db.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 281feb90fc99e4..1f3c36876f4531 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -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);