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

Function option_channel_base

plugins/funder.c:1606–1625  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1604};
1605
1606static char *option_channel_base(struct command *cmd, const char *arg,
1607 bool check_only, struct funder_policy *policy)
1608{
1609 struct amount_msat amt;
1610 u32 cfmbm;
1611
1612 if (!parse_amount_msat(&amt, arg, strlen(arg)))
1613 return tal_fmt(tmpctx, "Unable to parse amount '%s'", arg);
1614
1615 if (!assign_overflow_u32(&cfmbm, amt.millisatoshis)) /* Raw: conversion */
1616 return tal_fmt(tmpctx, "channel_fee_max_base_msat overflowed");
1617
1618 if (!check_only) {
1619 if (!policy->rates)
1620 policy->rates = default_lease_rates(policy);
1621 policy->rates->channel_fee_max_base_msat = cfmbm;
1622 }
1623
1624 return NULL;
1625}
1626
1627static char *
1628option_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