diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 52c047aa7..6106d8050 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -2285,19 +2285,6 @@ impl Bank { bank } - /// if we were to serialize THIS bank, what value should be saved for the prior accounts hash? - /// This depends on the proximity to the time to take the snapshot and the time to use the snapshot. - pub(crate) fn get_epoch_accounts_hash_to_serialize(&self) -> Option { - self.rc - .accounts - .accounts_db - .epoch_accounts_hash - .lock() - .unwrap() - .as_ref() - .map(|hash| *hash.as_ref()) - } - /// Return subset of bank fields representing serializable state pub(crate) fn get_fields_to_serialize<'a>( &'a self, @@ -7893,6 +7880,12 @@ impl Bank { total_accounts_stats } + /// if we were to serialize THIS bank, what value should be saved for the prior accounts hash? + /// This depends on the proximity to the time to take the snapshot and the time to use the snapshot. + pub(crate) fn get_epoch_accounts_hash_to_serialize(&self) -> Option { + self.epoch_accounts_hash().map(|hash| *hash.as_ref()) + } + /// Convenience fn to get the Epoch Accounts Hash fn epoch_accounts_hash(&self) -> Option { *self