MCPcopy Create free account
hub / github.com/ElementsProject/lightning / open_abort

Function open_abort

openingd/dualopend.c:359–390  ·  view source on GitHub ↗

Softer version of 'warning' (we don't disconnect) * Only valid iff *we* haven't sent tx-sigs for a in-progress * negotiation */

Source from the content-addressed store, hash-verified

357 * Only valid iff *we* haven't sent tx-sigs for a in-progress
358 * negotiation */
359static void open_abort(struct state *state,
360 const char *fmt, ...)
361{
362 va_list ap;
363 const char *errmsg;
364 u8 *msg;
365
366 va_start(ap, fmt);
367 errmsg = tal_vfmt(NULL, fmt, ap);
368 va_end(ap);
369
370 status_debug("aborted open negotiation, tx-abort: %s", errmsg);
371
372 /*~ The "billboard" (exposed as "status" in the JSON listpeers RPC
373 * call) is a transient per-channel area which indicates important
374 * information about what is happening. It has a "permanent" area for
375 * each state, which can be used to indicate what went wrong in that
376 * state (such as here), and a single transient area for current
377 * status. */
378 peer_billboard(true, errmsg);
379 msg = towire_tx_abort(NULL, &state->channel_id,
380 (u8 *)tal_dup_arr(tmpctx, char, errmsg,
381 strlen(errmsg), 0));
382 peer_write(state->pps, take(msg));
383
384 /* We're now in aborted mode, all
385 * subsequent msgs will be dropped */
386 if (!state->aborted_err)
387 state->aborted_err = tal_steal(state, errmsg);
388 else
389 tal_free(errmsg);
390}
391
392static void open_err_warn(struct state *state,
393 const char *fmt, ...)

Callers 11

negotiation_failedFunction · 0.85
handle_failure_fatalFunction · 0.85
fetch_psbt_changesFunction · 0.85
handle_tx_abortFunction · 0.85
run_tx_interactiveFunction · 0.85
accepter_startFunction · 0.85
opener_startFunction · 0.85
rbf_wrap_upFunction · 0.85
rbf_local_startFunction · 0.85
rbf_remote_startFunction · 0.85
do_reconnect_danceFunction · 0.85

Calls 3

peer_writeFunction · 0.85
tal_freeFunction · 0.85
peer_billboardFunction · 0.50

Tested by

no test coverage detected