@@ -167,6 +167,7 @@ pub struct ExecuteTimings {
167
167
pub load_us: u64,
168
168
pub execute_us: u64,
169
169
pub store_us: u64,
170
+ pub update_stakes_cache_us: u64,
170
171
pub total_batches_len: usize,
171
172
pub num_execute_batches: u64,
172
173
pub details: ExecuteDetailsTimings,
@@ -178,6 +179,7 @@ impl ExecuteTimings {
178
179
self.load_us += other.load_us;
179
180
self.execute_us += other.execute_us;
180
181
self.store_us += other.store_us;
182
+ self.update_stakes_cache_us += other.update_stakes_cache_us;
181
183
self.total_batches_len += other.total_batches_len;
182
184
self.num_execute_batches += other.num_execute_batches;
183
185
self.details.accumulate(&other.details);
@@ -3917,8 +3919,10 @@ impl Bank {
3917
3919
);
3918
3920
let rent_debits = self.collect_rent(executed, loaded_txs);
3919
3921
3922
+ let mut update_stakes_cache_time = Measure::start("update_stakes_cache_time");
3920
3923
let overwritten_vote_accounts =
3921
- self.update_cached_accounts(hashed_txs.as_transactions_iter(), executed, loaded_txs);
3924
+ self.update_stakes_cache(hashed_txs.as_transactions_iter(), executed, loaded_txs);
3925
+ update_stakes_cache_time.stop();
3922
3926
3923
3927
// once committed there is no way to unroll
3924
3928
write_time.stop();
@@ -3928,6 +3932,7 @@ impl Bank {
3928
3932
hashed_txs.len()
3929
3933
);
3930
3934
timings.store_us += write_time.as_us();
3935
+ timings.update_stakes_cache_us += update_stakes_cache_time.as_us();
3931
3936
self.update_transaction_statuses(hashed_txs, executed);
3932
3937
let fee_collection_results =
3933
3938
self.filter_program_errors_and_collect_fee(hashed_txs.as_transactions_iter(), executed);
@@ -5301,8 +5306,8 @@ impl Bank {
5301
5306
self.epoch_schedule.get_leader_schedule_epoch(slot)
5302
5307
}
5303
5308
5304
- /// a bank-level cache of vote accounts
5305
- fn update_cached_accounts <'a>(
5309
+ /// a bank-level cache of vote accounts and stake delegation info
5310
+ fn update_stakes_cache <'a>(
5306
5311
&self,
5307
5312
txs: impl Iterator<Item = &'a Transaction>,
5308
5313
res: &[TransactionExecutionResult],
0 commit comments