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

Function negotiation_failed

openingd/openingd.c:125–141  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 3

funder_channel_startFunction · 0.70
fundee_channelFunction · 0.70

Calls 3

towire_errorfmtFunction · 0.85
peer_writeFunction · 0.85
negotiation_abortedFunction · 0.70

Tested by

no test coverage detected