From baea4afdbd1eb619f70f57eeb57d92b0e2ab5e50 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Mon, 17 Feb 2025 21:38:15 +0530 Subject: [PATCH] miner: wait for next block before running commit interrupt tests --- miner/worker_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miner/worker_test.go b/miner/worker_test.go index 296b2dbca6..fff63b61b5 100644 --- a/miner/worker_test.go +++ b/miner/worker_test.go @@ -876,6 +876,9 @@ func TestCommitInterruptExperimentBor_NewTxFlow(t *testing.T) { head := <-chainHeadCh // We skip the initial 2 blocks as the mining timings are a bit skewed up 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 w.stop()