mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
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:
committed by
Christian Decker
parent
e13e3e90ec
commit
c4b7f4d9d2
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user