miner: wait for next block before running commit interrupt tests

This commit is contained in:
Manav Darji 2025-02-17 21:38:15 +05:30
parent 658bafe4db
commit baea4afdbd
No known key found for this signature in database
GPG key ID: A426F0124435F36E

View file

@ -876,6 +876,9 @@ func TestCommitInterruptExperimentBor_NewTxFlow(t *testing.T) {
head := <-chainHeadCh head := <-chainHeadCh
// We skip the initial 2 blocks as the mining timings are a bit skewed up // We skip the initial 2 blocks as the mining timings are a bit skewed up
if head.Block.NumberU64() == 2 { if head.Block.NumberU64() == 2 {
// Wait until `w.current` is updated for next block (3)
time.Sleep(100 * time.Millisecond)
// Stop the miner so that worker assumes it's a sentry and not a validator // Stop the miner so that worker assumes it's a sentry and not a validator
w.stop() w.stop()