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

Function init_set_feerate

lightningd/dual_open_control.c:3310–3329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3308}
3309
3310static struct command_result *init_set_feerate(struct command *cmd,
3311 u32 **feerate_per_kw,
3312 u32 **feerate_per_kw_funding)
3313
3314{
3315 if (!*feerate_per_kw_funding) {
3316 *feerate_per_kw_funding = tal(cmd, u32);
3317 **feerate_per_kw_funding = opening_feerate(cmd->ld->topology);
3318 if (!**feerate_per_kw_funding)
3319 return command_fail(cmd, LIGHTNINGD,
3320 "`funding_feerate` not specified and fee "
3321 "estimation failed");
3322 }
3323 if (!*feerate_per_kw) {
3324 *feerate_per_kw = tal(cmd, u32);
3325 **feerate_per_kw = **feerate_per_kw_funding;
3326 }
3327
3328 return NULL;
3329}
3330
3331static struct command_result *openchannel_init(struct command *cmd,
3332 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