Skip to content

Commit 08860df

Browse files
committed
Fix Genesis block race condition for block #1 production
Increased wait time from 2s to 5s to allow Genesis block processing from P2P queue before producer attempts to create block #1
1 parent 4995cf1 commit 08860df

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • development/qnet-integration/src

development/qnet-integration/src/node.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3328,7 +3328,10 @@ impl BlockchainNode {
33283328
}
33293329
}
33303330

3331-
tokio::time::sleep(Duration::from_secs(2)).await;
3331+
// CRITICAL FIX: Wait 5 seconds to allow Genesis block processing from P2P queue
3332+
// Genesis broadcast takes ~1s, P2P queue processing takes ~2-3s
3333+
// This prevents race condition where producer tries to create block #1 before Genesis is processed
3334+
tokio::time::sleep(Duration::from_secs(5)).await;
33323335
continue; // Skip this iteration
33333336
}
33343337
}

0 commit comments

Comments
 (0)