core-lightning/plugins/bkpr
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 bkpr-zeroconf: Zeroconfs will emit 'channel_proposed' event 2022-07-28 12:08:18 +09:30
account_entry.c bkpr: separate the invoice_fees from the invoice paid 2022-07-28 12:08:18 +09:30
account_entry.h bkpr: separate the invoice_fees from the invoice paid 2022-07-28 12:08:18 +09:30
account.c bkpr: new method, "is_external_account" 2022-07-28 12:08:18 +09:30
account.h bkpr: new method, "is_external_account" 2022-07-28 12:08:18 +09:30
bookkeeper.c bkpr/listpeeers: add lease_fees back to funds; separate out in listpeers 2022-07-31 21:53:05 +09:30
chain_event.c bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
chain_event.h bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
channel_event.c bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
channel_event.h bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
channelsapy.c bkpr: make sure there's always at least on difference in blockheights 2022-07-28 12:08:18 +09:30
channelsapy.h bkpr: command to calculate some APYs/stats on channel routing fees 2022-07-28 12:08:18 +09:30
db.c bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30
db.h bkpr: first attempt at database code for accounting 2022-07-28 12:08:18 +09:30
incomestmt.c bkpr: cleanup csv_safe_str 2022-07-28 12:08:18 +09:30
incomestmt.h bkpr csvs: koinly + cointracker only accept fees on the same line 2022-07-28 12:08:18 +09:30
Makefile plugins/Makefile: put bitcoin/chainparams.o in PLUGIN_COMMON_OBJS since everyone needs it. 2022-07-28 12:08:18 +09:30
onchain_fee.c bkpr: add 'msat' suffix to all msat denominated fields 2022-07-28 12:08:18 +09:30
onchain_fee.h bkpr: move json_to functions to respective type files 2022-07-28 12:08:18 +09:30
recorder.c bkpr-zeroconf: Zeroconfs will emit 'channel_proposed' event 2022-07-28 12:08:18 +09:30
recorder.h bkpr: save invoice description data to the database and display it 2022-07-28 12:08:18 +09:30