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

Function init_set_feerate

lightningd/dual_open_control.c:2564–2585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2562}
2563
2564static struct command_result *init_set_feerate(struct command *cmd,
2565 u32 **feerate_per_kw,
2566 u32 **feerate_per_kw_funding)
2567
2568{
2569 if (!*feerate_per_kw_funding) {
2570 *feerate_per_kw_funding = tal(cmd, u32);
2571 **feerate_per_kw_funding = opening_feerate(cmd->ld->topology);
2572 if (!**feerate_per_kw_funding)
2573 return command_fail(cmd, LIGHTNINGD,
2574 "`funding_feerate` not specified and fee "
2575 "estimation failed");
2576 }
2577 if (!*feerate_per_kw) {
2578 *feerate_per_kw = tal(cmd, u32);
2579 /* FIXME: Anchors are on by default, we should use the lowest
2580 * possible feerate */
2581 **feerate_per_kw = **feerate_per_kw_funding;
2582 }
2583
2584 return NULL;
2585}
2586
2587static struct command_result *json_openchannel_init(struct command *cmd,
2588 const char *buffer,

Callers 2

json_openchannel_initFunction · 0.85
json_queryratesFunction · 0.85

Calls 2

opening_feerateFunction · 0.85
command_failFunction · 0.70

Tested by

no test coverage detected