core-lightning/lightningd
niftynei 4e503f7d0a bkpr/listpeeers: add lease_fees back to funds; separate out in listpeers
First, how we record "our_funds" and then apply pushes vs lease_fees
(for liquidity ad buys/sales) was exactly opposite.

For pushes we were reporting the total funded into the channel, with the
push representing how much we'd later moved to the peer.

For lease_fees we were rerporting the total in the channel, with the
push representing how much was already moved to the peer.

We fix this (from a view perspective) by re-adding lease fees to what's
reported in the channel funding totals. Since this is now new behavior
(for leased channel values), we added new fields so we can take the old
field names thru a deprecation cycle.

We also make it possible to differentiate btw a push and a lease_fee
(before they were all the same), by adding to new fields to `listpeers`:
`fee_paid_msat` and `fee_rcvd_msat`.

This allows us to avoid math in the bookkeeper, instead we just pick
the numbers out directly and record them.

Fixes #5472

Changelog-Added: JSON-RPC: `listpeers` now has a few new fields for `funding` (`remote_funds_msat`, `local_funds_msat`, `fee_paid_msat`, `fee_rcvd_msat`).
Changelog-Deprecated: JSON-RPC: `listpeers`.`funded` fields `local_msat` and `remote_msat` are now deprecated.
2022-07-31 21:53:05 +09:30
..
test connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
.gitignore Ignore all the deamon inside the git history 2021-10-28 15:51:38 +02:00
bitcoind.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
bitcoind.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00
chaintopology.c lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
chaintopology.h lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
channel.c connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
channel.h lightningd: don't consider AWAITING_UNILATERAL to be "active". 2022-07-28 15:08:44 +09:30
channel_control.c bkpr: for zerconfs, we still wanna know you're opening a channel 2022-07-28 12:08:18 +09:30
channel_control.h bkpr: for zerconfs, we still wanna know you're opening a channel 2022-07-28 12:08:18 +09:30
channel_state.h channel-state: add two new states, for dualopend 2021-01-10 13:44:04 +01:00
closing_control.c lightningd: drive all reconnections out of disconnections. 2022-07-18 20:50:04 -05:00
closing_control.h patch lightningd-peer-fds.patch 2022-01-20 15:24:06 +10:30
coin_mvts.c balance_snapshot: emit balances for channels that are awaiting_lockin 2022-07-31 21:53:05 +09:30
coin_mvts.h coin_mvt: tiny, dont import lightningd header 2022-02-07 13:02:09 +10:30
connect_control.c connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
connect_control.h connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
datastore.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
dual_open_control.c connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
dual_open_control.h lightningd: hand fds to connectd, not receive them from connectd. 2022-07-18 20:50:04 -05:00
feerate.c lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
feerate.h lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
gossip_control.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
gossip_control.h connectd: remove second gossip fd. 2022-02-08 11:15:52 +10:30
hsm_control.c lightningd: expand exit codes for various failures. 2022-07-20 19:28:33 +09:30
hsm_control.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
htlc_end.c lightningd: fix overzealous check in htlc_out_check: 2022-04-20 16:30:05 +09:30
htlc_end.h coin_mvt: record fees for an outbound htlc 2021-12-28 04:42:42 +10:30
htlc_set.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
htlc_set.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
invoice.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
invoice.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
io_loop_with_timers.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
io_loop_with_timers.h lightningd/io_loop_with_timers.c: Move mainloop to its own source file, have chaintopology use it. 2019-05-31 17:57:10 +02:00
jsonrpc.c common/json_stream: make json_add_jsonstr take a length. 2022-07-17 08:51:02 +09:30
jsonrpc.h common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
lightningd.c tests: flake fix; l1 was waiting too long to reconnect 2022-07-25 16:28:09 +09:30
lightningd.h tests: flake fix; l1 was waiting too long to reconnect 2022-07-25 16:28:09 +09:30
log.c lightningd: fix fatal() log message in log. 2022-07-25 08:11:09 -07:00
log.h options: let log-level subsystem filter also cover nodeid. 2022-07-09 09:59:52 +09:30
log_status.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
log_status.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
Makefile lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
memdump.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
memdump.h lightningd: simplify memleak code. 2022-03-10 09:40:09 +10:30
notification.c bkpr: pass the node_id over for channel_opens, add to account 2022-07-28 12:08:18 +09:30
notification.h lightningd: add "style" to listforwards. 2022-03-31 19:38:05 +10:30
offer.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
onchain_control.c bkpr: for zerconfs, we still wanna know you're opening a channel 2022-07-28 12:08:18 +09:30
onchain_control.h onchaind: remove 'is_replay' logic 2021-12-28 04:42:42 +10:30
onion_message.c lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
onion_message.h common: remove support for pre v0.10.2 onionmessages. 2021-12-01 05:44:28 +10:30
opening_common.c lightningd: don't explicitly tell connectd to disconnect, have it do it on sending error/warning. 2022-07-18 20:50:04 -05:00
opening_common.h lightningd: set cid correctly in peer->uncommitted_channel. 2022-07-18 20:50:04 -05:00
opening_control.c connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
opening_control.h connectd: hold peer until we're interested. 2022-03-23 13:20:12 +10:30
options.c connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
options.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
pay.c lightningd/json.h: remove. 2022-07-15 12:24:00 -05:00
pay.h lightningd: use our cached channel_update for errors instead of asking gossipd. 2022-02-08 11:15:52 +10:30
peer_control.c bkpr/listpeeers: add lease_fees back to funds; separate out in listpeers 2022-07-31 21:53:05 +09:30
peer_control.h connectd: control connect backoff from lightningd. 2022-07-28 15:08:44 +09:30
peer_fd.c subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_fd.h subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_htlcs.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
peer_htlcs.h lightningd: extra sanity checks and rescue attempts for missing HTLCs. 2022-03-31 13:40:27 +10:30
ping.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
plugin.c lightningd: ignore default if it's a literal 'null' JSON token. 2022-07-26 09:33:40 -07:00
plugin.h lightningd: cleanup obsolete plugins->shutdown flag 2021-12-14 09:33:10 +10:30
plugin_control.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
plugin_control.h plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_hook.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
plugin_hook.h cleanup: remove unneeded includes in header files. 2021-09-17 09:43:22 +09:30
routehint.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
routehint.h invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
signmessage.c rpc: improve error format 2022-07-19 17:55:31 +02:00
subd.c options: let log-level subsystem filter also cover nodeid. 2022-07-09 09:59:52 +09:30
subd.h subd: make channel/peer own the subd. 2022-03-30 06:27:52 +10:30
watch.c check: make sure all files outside contrib/ include "config.h" first. 2021-12-06 10:05:39 +10:30
watch.h common: use bitcoin_outpoint. 2021-10-15 12:09:36 +02:00