From 613d963286e393a54d158f39350c448067af9876 Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Mon, 27 Nov 2023 10:41:47 -0700 Subject: [PATCH] [1757]: Don't tear down the network if it's nil. --- testutil/network.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testutil/network.go b/testutil/network.go index a0400b4c29..b35fab9bb1 100644 --- a/testutil/network.go +++ b/testutil/network.go @@ -62,6 +62,10 @@ func DefaultTestNetworkConfig() testnet.Config { } func CleanUp(n *testnet.Network, t *testing.T) { + if n == nil { + t.Log("nothing to tear down") + return + } t.Log("teardown waiting for next block") //nolint:errcheck // The test shouldn't fail because cleanup was a problem. So ignoring any error from this. n.WaitForNextBlock()