diff --git a/lntest/node.go b/lntest/node.go index 0431f3beb..2957e2c65 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -1599,6 +1599,15 @@ func (hn *HarnessNode) WaitForChannelPolicyUpdate(ctx context.Context, select { // Send a watch request every second. case <-ticker.C: + // Did the event can close in the meantime? We want to + // avoid a "close of closed channel" panic since we're + // re-using the same event chan for multiple requests. + select { + case <-eventChan: + return nil + default: + } + hn.chanWatchRequests <- &chanWatchRequest{ chanPoint: op, eventChan: eventChan,