Browse Source

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
fix-mocks
Michael Schmoock 4 years ago
committed by Christian Decker
parent
commit
c4b7f4d9d2
  1. 6
      lightningd/peer_control.c
  2. 6
      lightningd/test/run-invoice-select-inchan.c

6
lightningd/peer_control.c

@ -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,

6
lightningd/test/run-invoice-select-inchan.c

@ -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,

Loading…
Cancel
Save