Simplify replay_blockstore_into_bank() (#23282)
This commit is contained in:
parent
ff04a5b989
commit
533eca3b4c
|
@ -1613,7 +1613,10 @@ impl ReplayStage {
|
|||
verify_recyclers: &VerifyRecyclers,
|
||||
) -> result::Result<usize, BlockstoreProcessorError> {
|
||||
let tx_count_before = bank_progress.replay_progress.num_txs;
|
||||
let confirm_result = blockstore_processor::confirm_slot(
|
||||
// All errors must lead to marking the slot as dead, otherwise,
|
||||
// the `check_slot_agrees_with_cluster()` called by `replay_active_banks()`
|
||||
// will break!
|
||||
blockstore_processor::confirm_slot(
|
||||
blockstore,
|
||||
bank,
|
||||
&mut bank_progress.replay_stats,
|
||||
|
@ -1625,16 +1628,9 @@ impl ReplayStage {
|
|||
None,
|
||||
verify_recyclers,
|
||||
false,
|
||||
);
|
||||
)?;
|
||||
let tx_count_after = bank_progress.replay_progress.num_txs;
|
||||
let tx_count = tx_count_after - tx_count_before;
|
||||
confirm_result.map_err(|err| {
|
||||
// All errors must lead to marking the slot as dead, otherwise,
|
||||
// the `check_slot_agrees_with_cluster()` called by `replay_active_banks()`
|
||||
// will break!
|
||||
err
|
||||
})?;
|
||||
|
||||
Ok(tx_count)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue