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

Function negotiation_failed

openingd/openingd.c:127–143  ·  view source on GitHub ↗

~ For negotiation failures: we tell them the parameter we didn't like. */

Source from the content-addressed store, hash-verified

125
126/*~ For negotiation failures: we tell them the parameter we didn't like. */
127static void NORETURN negotiation_failed(struct state *state,
128 const char *fmt, ...)
129{
130 va_list ap;
131 const char *errmsg;
132 u8 *msg;
133
134 va_start(ap, fmt);
135 errmsg = tal_vfmt(tmpctx, fmt, ap);
136 va_end(ap);
137
138 msg = towire_errorfmt(NULL, &state->channel_id,
139 "You gave bad parameters: %s", errmsg);
140 peer_write(state->pps, take(msg));
141
142 negotiation_aborted(state, errmsg);
143}
144
145static void set_reserve_absolute(struct state * state, const struct amount_sat dust_limit, struct amount_sat reserve_sat)
146{

Callers 3

funder_channel_startFunction · 0.70
fundee_channelFunction · 0.70

Calls 3

peer_writeFunction · 0.85
negotiation_abortedFunction · 0.70
towire_errorfmtFunction · 0.50

Tested by

no test coverage detected