itest+lntest: make sure states are cleaned when tests end

This commit changes how the node's state is updated to make sure the
test cleans up the node's state.

Also `testLookupHtlcResolution` is fixed with a cleanup.
This commit is contained in:
yyforyongyu
2023-03-14 21:24:50 +08:00
parent 098bb36114
commit 20e53e85b4
2 changed files with 41 additions and 21 deletions

View File

@@ -24,6 +24,7 @@ func testLookupHtlcResolution(ht *lntest.HarnessTest) {
cp := ht.OpenChannel(
alice, carol, lntest.OpenChannelParams{Amt: chanAmt},
)
defer ht.CloseChannel(alice, cp)
// Channel should be ready for payments.
const payAmt = 100