diff --git a/consensus/src/consensus/mod.rs b/consensus/src/consensus/mod.rs index 03b51e394..16b72e917 100644 --- a/consensus/src/consensus/mod.rs +++ b/consensus/src/consensus/mod.rs @@ -354,7 +354,7 @@ impl Consensus { } pub fn signal_exit(&self) { - self.is_consensus_exiting.store(true, Ordering::SeqCst); + self.is_consensus_exiting.store(true, Ordering::Relaxed); self.block_sender.send(BlockProcessingMessage::Exit).unwrap(); } diff --git a/consensus/src/pipeline/pruning_processor/processor.rs b/consensus/src/pipeline/pruning_processor/processor.rs index 3a04b489d..fe3d2a15d 100644 --- a/consensus/src/pipeline/pruning_processor/processor.rs +++ b/consensus/src/pipeline/pruning_processor/processor.rs @@ -345,7 +345,7 @@ impl PruningProcessor { if lock_acquire_time.elapsed() > Duration::from_millis(5) { drop(reachability_read); // An exit signal was received. Exit from this long running process. - if self.is_consensus_exiting.load(Ordering::SeqCst) { + if self.is_consensus_exiting.load(Ordering::Relaxed) { drop(prune_guard); info!("Header and Block pruning interrupted: Process is exiting"); return; diff --git a/consensus/src/processes/pruning_proof/mod.rs b/consensus/src/processes/pruning_proof/mod.rs index e7f703c6a..a31c3d2d4 100644 --- a/consensus/src/processes/pruning_proof/mod.rs +++ b/consensus/src/processes/pruning_proof/mod.rs @@ -441,7 +441,7 @@ impl PruningProofManager { let mut selected_tip_by_level = vec![None; self.max_block_level as usize + 1]; for level in (0..=self.max_block_level).rev() { // Before processing this level, check if the process is exiting so we can end early - if self.is_consensus_exiting.load(Ordering::SeqCst) { + if self.is_consensus_exiting.load(Ordering::Relaxed) { return Err(PruningImportError::PruningValidationInterrupted); }