| 528 | } |
| 529 | |
| 530 | static struct command_result *param_feerate_range(struct command *cmd, |
| 531 | const char *name, |
| 532 | const char *buffer, |
| 533 | const jsmntok_t *tok, |
| 534 | u32 **feerate_range) |
| 535 | { |
| 536 | struct command_result *ret; |
| 537 | u32 *rate; |
| 538 | |
| 539 | *feerate_range = tal_arr(cmd, u32, 2); |
| 540 | if (tok->type != JSMN_ARRAY || tok->size != 2) |
| 541 | return command_fail_badparam(cmd, name, buffer, tok, |
| 542 | "should be an array of 2 entries"); |
| 543 | |
| 544 | ret = param_feerate(cmd, name, buffer, tok+1, &rate); |
| 545 | if (ret) |
| 546 | return ret; |
| 547 | (*feerate_range)[0] = *rate; |
| 548 | ret = param_feerate(cmd, name, buffer, tok+2, &rate); |
| 549 | if (ret) |
| 550 | return ret; |
| 551 | (*feerate_range)[1] = *rate; |
| 552 | return NULL; |
| 553 | } |
| 554 | |
| 555 | /* Only one of these will be set! */ |
| 556 | struct some_channel { |
nothing calls this directly
no test coverage detected