~ For negotiation failures: we tell them the parameter we didn't like. */
| 123 | |
| 124 | /*~ For negotiation failures: we tell them the parameter we didn't like. */ |
| 125 | static 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 | |
| 143 | static void set_reserve_absolute(struct state * state, const struct amount_sat dust_limit, struct amount_sat reserve_sat) |
| 144 | { |
no test coverage detected