lnd: replace defer cleanup with t.Cleanup

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun
2022-08-27 15:09:02 +08:00
parent 228f1e36c4
commit 604a355db6
2 changed files with 2 additions and 3 deletions

View File

@@ -37,8 +37,7 @@ func TestWitnessBeaconIntercept(t *testing.T) {
[]byte{2},
)
require.NoError(t, err)
defer subscription.CancelSubscription()
t.Cleanup(subscription.CancelSubscription)
require.NoError(t, interceptedFwd.Settle(preimage))