dualopend: reverse polarity of send_next

Suggested-By: @rustyrussell
This commit is contained in:
niftynei 2020-09-17 14:00:26 -05:00 committed by Rusty Russell
parent 5fbd25f938
commit 33769cca4f
1 changed files with 3 additions and 3 deletions

View File

@ -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");