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

Function param_feerate_range

lightningd/closing_control.c:508–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508static 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! */
534struct some_channel {

Callers

nothing calls this directly

Calls 2

param_feerateFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected