| 506 | } |
| 507 | |
| 508 | static struct command_result *param_feerate_range(struct command *cmd, |
| 509 | const char *name, |
| 510 | const char *buffer, |
| 511 | const jsmntok_t *tok, |
| 512 | u32 **feerate_range) |
| 513 | { |
| 514 | struct command_result *ret; |
| 515 | u32 *rate; |
| 516 | |
| 517 | *feerate_range = tal_arr(cmd, u32, 2); |
| 518 | if (tok->type != JSMN_ARRAY || tok->size != 2) |
| 519 | return command_fail_badparam(cmd, name, buffer, tok, |
| 520 | "should be an array of 2 entries"); |
| 521 | |
| 522 | ret = param_feerate(cmd, name, buffer, tok+1, &rate); |
| 523 | if (ret) |
| 524 | return ret; |
| 525 | (*feerate_range)[0] = *rate; |
| 526 | ret = param_feerate(cmd, name, buffer, tok+2, &rate); |
| 527 | if (ret) |
| 528 | return ret; |
| 529 | (*feerate_range)[1] = *rate; |
| 530 | return NULL; |
| 531 | } |
| 532 | |
| 533 | /* Only one of these will be set! */ |
| 534 | struct some_channel { |
nothing calls this directly
no test coverage detected