Skip to content

Commit

Permalink
chore: lint comments
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Oct 10, 2023
1 parent 308edfa commit dfb8b92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tm2/pkg/bft/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,28 @@ func TestNodeFirstBlockSignal(t *testing.T) {
n, err := DefaultNewNode(config, log.TestingLogger())
require.NoError(t, err)

// Assert that blockstore is 0 before waiting for the first block
// Assert that blockstore has zero block before waiting for the first block
require.Equal(t, int64(0), n.BlockStore().Height())

// Assert that first block signal is not alreay received
select {
case <-n.FirstBlockReceived():
require.FailNow(t, "firstblock signal should not be close before starting the node")
require.FailNow(t, "first block signal should not be close before starting the node")
default: // ok
}

err = n.Start()
require.NoError(t, err)
defer n.Stop()

// Wait until we got the first block or timeout
select {
case <-n.FirstBlockReceived(): // ready
case <-time.After(time.Second):
require.FailNow(t, "timeout while waiting for first block signal")
case <-n.FirstBlockReceived(): // ready
}

// Check that blockstore have at last 1 height size
// Check that blockstore have at last one block
require.GreaterOrEqual(t, n.BlockStore().Height(), int64(1))
}

Expand Down

0 comments on commit dfb8b92

Please sign in to comment.