diff --git a/runtime/src/bank/bank_hash_details.rs b/runtime/src/bank/bank_hash_details.rs index ba341a52044f8c..7ee2879c95fbb0 100644 --- a/runtime/src/bank/bank_hash_details.rs +++ b/runtime/src/bank/bank_hash_details.rs @@ -15,6 +15,7 @@ use { solana_sdk::{ account::{Account, AccountSharedData, ReadableAccount}, clock::{Epoch, Slot}, + feature_set, fee::FeeDetails, hash::Hash, inner_instruction::InnerInstructionsList, @@ -123,6 +124,8 @@ pub struct BankHashComponents { pub last_blockhash: String, #[serde(skip_serializing_if = "Option::is_none")] pub epoch_accounts_hash: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub accounts_lt_hash_checksum: Option, pub accounts: AccountsDetails, } @@ -155,6 +158,17 @@ impl SlotDetails { epoch_accounts_hash: bank .wait_get_epoch_accounts_hash() .map(|hash| hash.as_ref().to_string()), + accounts_lt_hash_checksum: bank + .feature_set + .is_active(&feature_set::accounts_lt_hash::id()) + .then(|| { + bank.accounts_lt_hash + .lock() + .unwrap() + .0 + .checksum() + .to_string() + }), accounts: AccountsDetails { accounts }, }) } else { @@ -338,6 +352,11 @@ pub mod tests { } else { None }, + accounts_lt_hash_checksum: if slot % 3 == 0 { + Some("accounts_lt_hash_checksum".into()) + } else { + None + }, accounts, }), transactions: vec![],