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

Function option_lease_fee_base

plugins/funder.c:1627–1650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1625}
1626
1627static char *option_lease_fee_base(struct command *cmd, const char *arg,
1628 bool check_only,
1629 struct funder_policy *policy)
1630{
1631 struct amount_sat amt;
1632 u32 lfbs;
1633 char *err;
1634
1635 err = amount_option(cmd, arg, false, &amt);
1636 if (err)
1637 return err;
1638
1639 if (!assign_overflow_u32(&lfbs, amt.satoshis)) /* Raw: conversion */
1640 return tal_fmt(tmpctx, "lease_fee_base_sat overflowed");
1641
1642 if (!check_only) {
1643 if (!policy->rates)
1644 policy->rates = default_lease_rates(policy);
1645
1646 policy->rates->lease_fee_base_sat = lfbs;
1647 }
1648
1649 return NULL;
1650}
1651
1652static char *option_lease_fee_basis(struct command *cmd, const char *arg,
1653 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