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

Function option_channel_base

plugins/funder.c:1565–1584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1563};
1564
1565static char *option_channel_base(struct command *cmd, const char *arg,
1566 bool check_only, struct funder_policy *policy)
1567{
1568 struct amount_msat amt;
1569 u32 cfmbm;
1570
1571 if (!parse_amount_msat(&amt, arg, strlen(arg)))
1572 return tal_fmt(tmpctx, "Unable to parse amount '%s'", arg);
1573
1574 if (!assign_overflow_u32(&cfmbm, amt.millisatoshis)) /* Raw: conversion */
1575 return tal_fmt(tmpctx, "channel_fee_max_base_msat overflowed");
1576
1577 if (!check_only) {
1578 if (!policy->rates)
1579 policy->rates = default_lease_rates(policy);
1580 policy->rates->channel_fee_max_base_msat = cfmbm;
1581 }
1582
1583 return NULL;
1584}
1585
1586static char *
1587option_channel_fee_proportional_thousandths_max(struct command *cmd,

Callers

nothing calls this directly

Calls 3

assign_overflow_u32Function · 0.85
default_lease_ratesFunction · 0.85
parse_amount_msatFunction · 0.50

Tested by

no test coverage detected