Skip to content

Commit 67c3bff

Browse files
authored
fix polarity for concurrent replay (pyth-network#297)
* fix polarity for concurrent replay
1 parent ed573ff commit 67c3bff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/replay_stage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,14 +655,14 @@ impl ReplayStage {
655655
};
656656
// Thread pool to (maybe) replay multiple threads in parallel
657657
let replay_mode = if replay_slots_concurrently {
658-
ForkReplayMode::Serial
659-
} else {
660658
let pool = rayon::ThreadPoolBuilder::new()
661659
.num_threads(MAX_CONCURRENT_FORKS_TO_REPLAY)
662660
.thread_name(|i| format!("solReplayFork{i:02}"))
663661
.build()
664662
.expect("new rayon threadpool");
665663
ForkReplayMode::Parallel(pool)
664+
} else {
665+
ForkReplayMode::Serial
666666
};
667667
// Thread pool to replay multiple transactions within one block in parallel
668668
let replay_tx_thread_pool = rayon::ThreadPoolBuilder::new()

0 commit comments

Comments
 (0)