From 33769cca4f6882fb831f1e80b7e5eb95c6e79b02 Mon Sep 17 00:00:00 2001 From: niftynei Date: Thu, 17 Sep 2020 14:00:26 -0500 Subject: [PATCH] dualopend: reverse polarity of send_next Suggested-By: @rustyrussell --- openingd/dualopend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 6c3d9675b..67dce1cc7 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -446,7 +446,7 @@ static bool send_next(struct state *state, struct wally_psbt **psbt) sendmsg: sync_crypto_write(state->pps, msg); - return finished; + return !finished; } static void init_changeset(struct state *state, struct wally_psbt *psbt) @@ -828,7 +828,7 @@ static bool run_tx_interactive(struct state *state, struct wally_psbt **orig_psb } if (!(we_complete && they_complete)) - we_complete = send_next(state, &psbt); + we_complete = !send_next(state, &psbt); } /* Sort psbt! */ @@ -1412,7 +1412,7 @@ static u8 *opener_start(struct state *state, u8 *msg) } /* Send our first message, we're opener we initiate here */ - if (send_next(state, &psbt)) + if (!send_next(state, &psbt)) negotiation_failed(state, true, "Peer error, no updates to send");