Skip to content

Commit

Permalink
replay: do not hold bank forks lock during mark_dead_slot (anza-xyz#1597
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AshwinSekar authored and samkim-crypto committed Jul 31, 2024
1 parent f084303 commit 3456eb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2979,10 +2979,11 @@ impl ReplayStage {
match replay_result {
Ok(replay_tx_count) => tx_count += replay_tx_count,
Err(err) => {
let root = bank_forks.read().unwrap().root();
Self::mark_dead_slot(
blockstore,
bank,
bank_forks.read().unwrap().root(),
root,
err,
rpc_subscriptions,
duplicate_slots_tracker,
Expand Down Expand Up @@ -3022,10 +3023,11 @@ impl ReplayStage {
.accumulate(metrics);

if let Err(err) = result {
let root = bank_forks.read().unwrap().root();
Self::mark_dead_slot(
blockstore,
bank,
bank_forks.read().unwrap().root(),
root,
&BlockstoreProcessorError::InvalidTransaction(err),
rpc_subscriptions,
duplicate_slots_tracker,
Expand Down

0 comments on commit 3456eb0

Please sign in to comment.