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

Function negotiation_failed

openingd/openingd.c:128–144  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

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