Use type aliases/resulting var names consistently (#9060)

This commit is contained in:
Ryo Onodera
2020-03-26 13:08:56 +09:00
committed by GitHub
parent e4472db33f
commit 2623c71ed3
4 changed files with 118 additions and 123 deletions

View File

@@ -535,15 +535,15 @@ impl Accounts {
}
}
pub fn bank_hash_at(&self, slot_id: Slot) -> Hash {
self.bank_hash_info_at(slot_id).hash
pub fn bank_hash_at(&self, slot: Slot) -> Hash {
self.bank_hash_info_at(slot).hash
}
pub fn bank_hash_info_at(&self, slot_id: Slot) -> BankHashInfo {
let delta_hash = self.accounts_db.get_accounts_delta_hash(slot_id);
pub fn bank_hash_info_at(&self, slot: Slot) -> BankHashInfo {
let delta_hash = self.accounts_db.get_accounts_delta_hash(slot);
let bank_hashes = self.accounts_db.bank_hashes.read().unwrap();
let mut hash_info = bank_hashes
.get(&slot_id)
.get(&slot)
.expect("No bank hash was found for this bank, that should not be possible")
.clone();
hash_info.hash = delta_hash;