We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5542c0f commit 09b77daCopy full SHA for 09b77da
1 file changed
runtime/benches/epoch_turnover.rs
@@ -114,14 +114,13 @@ fn setup_bank() -> Arc<Bank> {
114
115
populate_vote_accounts(&initial_bank, vote_pubkeys);
116
117
- let last_slot_in_epoch = initial_bank.get_slots_in_epoch(0) - 1;
118
- let final_bank = Arc::new(Bank::new_from_parent(
+ let last_slot_in_epoch = initial_bank.get_slots_in_epoch(0).checked_sub(1).unwrap();
+
119
+ Arc::new(Bank::new_from_parent(
120
initial_bank,
121
&Pubkey::default(),
122
last_slot_in_epoch,
- ));
123
-
124
- final_bank
+ ))
125
}
126
127
// start with a bank at the last slot in an epoch, measure advancing the slot
0 commit comments