Simplify replay_blockstore_into_bank() (#23282)
This commit is contained in:
@ -1613,7 +1613,10 @@ impl ReplayStage {
|
|||||||
verify_recyclers: &VerifyRecyclers,
|
verify_recyclers: &VerifyRecyclers,
|
||||||
) -> result::Result<usize, BlockstoreProcessorError> {
|
) -> result::Result<usize, BlockstoreProcessorError> {
|
||||||
let tx_count_before = bank_progress.replay_progress.num_txs;
|
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,
|
blockstore,
|
||||||
bank,
|
bank,
|
||||||
&mut bank_progress.replay_stats,
|
&mut bank_progress.replay_stats,
|
||||||
@ -1625,16 +1628,9 @@ impl ReplayStage {
|
|||||||
None,
|
None,
|
||||||
verify_recyclers,
|
verify_recyclers,
|
||||||
false,
|
false,
|
||||||
);
|
)?;
|
||||||
let tx_count_after = bank_progress.replay_progress.num_txs;
|
let tx_count_after = bank_progress.replay_progress.num_txs;
|
||||||
let tx_count = tx_count_after - tx_count_before;
|
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)
|
Ok(tx_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user