From 74205a64fd34879f031b85722d8fc3549889463a Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Fri, 18 May 2018 15:21:31 +0200 Subject: [PATCH] lnd_test: check for coop closed channel among WaitingClose instead of PendingClosed --- lnd_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lnd_test.go b/lnd_test.go index 3cc478bf..7105676e 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -216,7 +216,7 @@ func closeChannelAndAssert(ctx context.Context, t *harnessTest, chanPointStr := fmt.Sprintf("%v:%v", txid, fundingChanPoint.OutputIndex) // If we didn't force close the transaction, at this point, the channel - // should now be marked as being in the state of "pending close". + // should now be marked as being in the state of "waiting close". if !force { pendingChansRequest := &lnrpc.PendingChannelsRequest{} pendingChanResp, err := node.PendingChannels(ctx, pendingChansRequest) @@ -224,14 +224,14 @@ func closeChannelAndAssert(ctx context.Context, t *harnessTest, t.Fatalf("unable to query for pending channels: %v", err) } var found bool - for _, pendingClose := range pendingChanResp.PendingClosingChannels { + for _, pendingClose := range pendingChanResp.WaitingCloseChannels { if pendingClose.Channel.ChannelPoint == chanPointStr { found = true break } } if !found { - t.Fatalf("channel not marked as pending close") + t.Fatalf("channel not marked as waiting close") } } @@ -247,7 +247,7 @@ func closeChannelAndAssert(ctx context.Context, t *harnessTest, assertTxInBlock(t, block, closingTxid) - // Finally, the transaction should no longer be in the pending close + // Finally, the transaction should no longer be in the waiting close // state as we've just mined a block that should include the closing // transaction. This only applies for co-op close channels though. if !force { @@ -260,7 +260,7 @@ func closeChannelAndAssert(ctx context.Context, t *harnessTest, return false } - for _, pendingClose := range pendingChanResp.PendingClosingChannels { + for _, pendingClose := range pendingChanResp.WaitingCloseChannels { if pendingClose.Channel.ChannelPoint == chanPointStr { return false }