Skip to content

Commit a234096

Browse files
committed
improve comment
1 parent 7f8a2d0 commit a234096

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

node/src/consensus/aura_consensus.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ impl ConsensusMechanism for AuraConsensus {
213213
// Aura Consensus uses the hybrid import queue which is able to import both
214214
// Aura and Babe blocks. Wait until sync finishes before switching to the
215215
// Babe service to not break warp sync.
216+
//
217+
// Note that although unintuitive, it is required that we wait until BOTH
218+
// warp sync and state sync are finished before we can safely switch to the
219+
// Babe service. If we only wait for the "warp sync" to finish while state
220+
// sync is still in progress prior to switching, the warp sync will not
221+
// complete successfully.
216222
let syncing = sync_service.status().await.is_ok_and(|status| status.warp_sync.is_some() || status.state_sync.is_some());
217223
if !c.authorities.is_empty() && !syncing {
218224
log::info!("Babe runtime detected! Intentionally failing the essential handle `babe-switch` to trigger switch to Babe service.");

0 commit comments

Comments
 (0)