feat: adds local halfchan fees to listpeers

This will add `fee_base` (msat) and `fee_ppm` (u32 num) to the RPC
`listpeers` output.

Changelog-Added: fee_base and fee_ppm to listpeers
This commit is contained in:
Michael Schmoock 2020-12-02 15:17:06 +01:00 committed by Christian Decker
parent e13e3e90ec
commit c4b7f4d9d2
2 changed files with 12 additions and 0 deletions

View file

@ -877,6 +877,12 @@ static void json_add_channel(struct lightningd *ld,
json_add_amount_msat_compat(response, funding_msat,
"msatoshi_total", "total_msat");
/* routing fees */
json_add_amount_msat_only(response, "fee_base_msat",
amount_msat(channel->feerate_base));
json_add_u32(response, "fee_proportional_millionths",
channel->feerate_ppm);
/* channel config */
json_add_amount_sat_compat(response,
channel->our_config.dust_limit,

View file

@ -224,6 +224,12 @@ void json_add_amount_msat_compat(struct json_stream *result UNNEEDED,
const char *msatfieldname)
{ fprintf(stderr, "json_add_amount_msat_compat called!\n"); abort(); }
/* Generated stub for json_add_amount_msat_only */
void json_add_amount_msat_only(struct json_stream *result UNNEEDED,
const char *msatfieldname UNNEEDED,
struct amount_msat msat)
{ fprintf(stderr, "json_add_amount_msat_only called!\n"); abort(); }
/* Generated stub for json_add_amount_sat_compat */
void json_add_amount_sat_compat(struct json_stream *result UNNEEDED,
struct amount_sat sat UNNEEDED,