| 172 | } |
| 173 | |
| 174 | static char *opt_force_feerates(const char *arg, struct lightningd *ld) |
| 175 | { |
| 176 | char **vals = tal_strsplit(tmpctx, arg, "/", STR_EMPTY_OK); |
| 177 | size_t n; |
| 178 | |
| 179 | /* vals has NULL at end, enum feerate is 0 based */ |
| 180 | if (tal_count(vals) - 1 > FEERATE_PENALTY + 1) |
| 181 | return "Too many values"; |
| 182 | |
| 183 | if (!ld->force_feerates) |
| 184 | ld->force_feerates = tal_arr(ld, u32, FEERATE_PENALTY + 1); |
| 185 | |
| 186 | n = 0; |
| 187 | for (size_t i = 0; i < tal_count(ld->force_feerates); i++) { |
| 188 | char *err = opt_set_u32(vals[n], &ld->force_feerates[i]); |
| 189 | if (err) |
| 190 | return err; |
| 191 | fprintf(stderr, "Set feerate %zu based on val %zu\n", i, n); |
| 192 | if (vals[n+1]) |
| 193 | n++; |
| 194 | } |
| 195 | return NULL; |
| 196 | } |
| 197 | |
| 198 | static char *opt_add_accept_htlc_tlv(const char *arg, |
| 199 | u64 **accept_extra_tlv_types) |
nothing calls this directly
no test coverage detected