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

Function handle_tx_abort

openingd/dualopend.c:1521–1547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1519}
1520
1521static void handle_tx_abort(struct state *state, u8 *msg)
1522{
1523 const char *desc;
1524
1525 /*
1526 * BOLT #2:
1527 *
1528 * Echoing back `tx_abort` allows the peer to ack
1529 * that they've seen the abort message, permitting
1530 * the originating peer to terminate the in-flight
1531 * process without worrying about stale messages.
1532 */
1533 if (!state->aborted_err) {
1534 /* If they sent this after tx-sigs, it's a
1535 * protocol error */
1536 if (state->tx_state->remote_funding_sigs_rcvd)
1537 open_err_fatal(state, "tx-abort rcvd after"
1538 " tx-sigs");
1539
1540 open_abort(state, "%s", "Rcvd tx-abort");
1541 desc = tal_fmt(tmpctx, "They sent %s",
1542 sanitize_error(tmpctx, msg, NULL));
1543 } else
1544 desc = state->aborted_err;
1545
1546 negotiation_aborted(state, desc, true);
1547}
1548
1549static u8 *handle_channel_ready(struct state *state, u8 *msg)
1550{

Callers 3

opening_negotiate_msgFunction · 0.85
run_tx_interactiveFunction · 0.85
handle_peer_inFunction · 0.85

Calls 4

open_err_fatalFunction · 0.85
open_abortFunction · 0.85
sanitize_errorFunction · 0.85
negotiation_abortedFunction · 0.70

Tested by

no test coverage detected