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

Function option_lease_fee_base

plugins/funder.c:1668–1691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1666}
1667
1668static char *option_lease_fee_base(struct command *cmd, const char *arg,
1669 bool check_only,
1670 struct funder_policy *policy)
1671{
1672 struct amount_sat amt;
1673 u32 lfbs;
1674 char *err;
1675
1676 err = amount_option(cmd, arg, false, &amt);
1677 if (err)
1678 return err;
1679
1680 if (!assign_overflow_u32(&lfbs, amt.satoshis)) /* Raw: conversion */
1681 return tal_fmt(tmpctx, "lease_fee_base_sat overflowed");
1682
1683 if (!check_only) {
1684 if (!policy->rates)
1685 policy->rates = default_lease_rates(policy);
1686
1687 policy->rates->lease_fee_base_sat = lfbs;
1688 }
1689
1690 return NULL;
1691}
1692
1693static char *option_lease_fee_basis(struct command *cmd, const char *arg,
1694 bool check_only,

Callers

nothing calls this directly

Calls 3

amount_optionFunction · 0.85
assign_overflow_u32Function · 0.85
default_lease_ratesFunction · 0.85

Tested by

no test coverage detected