Skip to content

Commit

Permalink
[1757]: Don't tear down the network if it's nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon committed Nov 27, 2023
1 parent 04fc557 commit 613d963
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testutil/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 613d963

Please sign in to comment.