From: Matt Corallo Date: Tue, 8 Jun 2021 18:01:37 +0000 (+0000) Subject: Fix race in C++ demo where num_txs_broadcasted ++s before =0s X-Git-Tag: v0.0.98~2^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=7b6e98c6d5c05d7d94fc5bff49f3235f3aa0a07f;p=ldk-c-bindings 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(); }