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

Function init_set_feerate

lightningd/dual_open_control.c:3024–3043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3022}
3023
3024static struct command_result *init_set_feerate(struct command *cmd,
3025 u32 **feerate_per_kw,
3026 u32 **feerate_per_kw_funding)
3027
3028{
3029 if (!*feerate_per_kw_funding) {
3030 *feerate_per_kw_funding = tal(cmd, u32);
3031 **feerate_per_kw_funding = opening_feerate(cmd->ld->topology);
3032 if (!**feerate_per_kw_funding)
3033 return command_fail(cmd, LIGHTNINGD,
3034 "`funding_feerate` not specified and fee "
3035 "estimation failed");
3036 }
3037 if (!*feerate_per_kw) {
3038 *feerate_per_kw = tal(cmd, u32);
3039 **feerate_per_kw = **feerate_per_kw_funding;
3040 }
3041
3042 return NULL;
3043}
3044
3045static struct command_result *openchannel_init(struct command *cmd,
3046 struct peer *peer,

Callers 2

json_openchannel_initFunction · 0.85
json_queryratesFunction · 0.85

Calls 2

opening_feerateFunction · 0.70
command_failFunction · 0.70

Tested by

no test coverage detected