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

Function open_abort

openingd/dualopend.c:351–382  ·  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

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

Callers 10

negotiation_failedFunction · 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