From 2c27df6c30d743d6a54133c32ca3d4f1781c9cda Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Sat, 26 Oct 2024 03:29:12 +0800 Subject: [PATCH] itest: print num of blocks for debugging --- itest/lnd_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/itest/lnd_test.go b/itest/lnd_test.go index 5b9105694..cb0871b96 100644 --- a/itest/lnd_test.go +++ b/itest/lnd_test.go @@ -106,6 +106,9 @@ func TestLightningNetworkDaemon(t *testing.T) { // among all the test cases. harnessTest.SetupStandbyNodes() + // Get the current block height. + height := harnessTest.CurrentHeight() + // Run the subset of the test cases selected in this tranche. for idx, testCase := range testCases { testCase := testCase @@ -151,9 +154,10 @@ func TestLightningNetworkDaemon(t *testing.T) { } } - height := harnessTest.CurrentHeight() - t.Logf("=========> tests finished for tranche: %v, tested %d "+ - "cases, end height: %d\n", trancheIndex, len(testCases), height) + //nolint:forbidigo + fmt.Printf("=========> tranche %v finished, tested %d cases, mined "+ + "blocks: %d\n", trancheIndex, len(testCases), + harnessTest.CurrentHeight()-height) } // getTestCaseSplitTranche returns the sub slice of the test cases that should