projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e514de
)
Fix race in C++ demo where num_txs_broadcasted ++s before =0s
author
Matt Corallo
<git@bluematt.me>
Tue, 8 Jun 2021 18:01:37 +0000
(18:01 +0000)
committer
Matt Corallo
<git@bluematt.me>
Tue, 8 Jun 2021 18:02:24 +0000
(18:02 +0000)
lightning-c-bindings/demo.cpp
patch
|
blob
|
history
diff --git
a/lightning-c-bindings/demo.cpp
b/lightning-c-bindings/demo.cpp
index de1e46c4a969ccca29380e23212f2a804f6a1971..1d83b21003966ff1d520e764a33265ea052a8403 100644
(file)
--- 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();
}