projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0e733e
)
fix?
author
Matt Corallo
<git@bluematt.me>
Mon, 4 Jan 2021 17:19:09 +0000
(12:19 -0500)
committer
Matt Corallo
<git@bluematt.me>
Mon, 4 Jan 2021 21:14:26 +0000
(16:14 -0500)
lightning-c-bindings/demo.cpp
patch
|
blob
|
history
diff --git
a/lightning-c-bindings/demo.cpp
b/lightning-c-bindings/demo.cpp
index cf8ca1baf3175c149f67dc04036ed68fcf455dc6..ca2c235409559e54c993d58b39b3c581041d9f5a 100644
(file)
--- 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);