From be069d6f8ddfd357daa496525d350906a280fd92 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 4 Jan 2021 12:19:09 -0500 Subject: [PATCH] fix? --- lightning-c-bindings/demo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lightning-c-bindings/demo.cpp b/lightning-c-bindings/demo.cpp index cf8ca1ba..ca2c2354 100644 --- a/lightning-c-bindings/demo.cpp +++ b/lightning-c-bindings/demo.cpp @@ -605,6 +605,14 @@ int main() { PeersConnection conn(cm1, cm2, net1, net2); + while (true) { + // Wait for the channels to be considered up + LDK::CVec_ChannelDetailsZ outbound_channels = ChannelManager_list_usable_channels(&cm1); + if (outbound_channels->datalen == 1) { + break; + } + } + // Actually close the channel close_res = ChannelManager_close_channel(&cm1, &chan_id); assert(close_res->result_ok); -- 2.30.2