From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Tue, 8 Jun 2021 18:17:35 +0000 (+0000) Subject: Merge pull request #27 from TheBlueMatt/main X-Git-Tag: v0.0.98~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=commitdiff_plain;h=710ca31e66a574c24ce59bd0d40362b9adb6e978;hp=fb566be33e2ef66027d0ad3323b284a0435ec494 Merge pull request #27 from TheBlueMatt/main Fix race in C++ demo where num_txs_broadcasted ++s before =0s --- diff --git a/lightning-c-bindings/demo.cpp b/lightning-c-bindings/demo.cpp index de1e46c..1d83b21 100644 --- a/lightning-c-bindings/demo.cpp +++ b/lightning-c-bindings/demo.cpp @@ -641,10 +641,10 @@ int main() { } // Actually close the channel + num_txs_broadcasted = 0; close_res = ChannelManager_close_channel(&cm1, &chan_id); assert(close_res->result_ok); PeerManager_process_events(&net1); - num_txs_broadcasted = 0; while (num_txs_broadcasted != 2) { std::this_thread::yield(); }