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

Function param_feerate_range

lightningd/closing_control.c:530–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530static 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! */
556struct some_channel {

Callers

nothing calls this directly

Calls 2

command_fail_badparamFunction · 0.85
param_feerateFunction · 0.85

Tested by

no test coverage detected