core-lightning/plugins/bkpr
niftynei 791c1a7526 bkpr: cleanup wallet fee entries if decide they belong to a channel
Because we update the onchain_fee table every time a new event comes in,
it's possible (and in fact happens) that we get a wallet
withdraw/deposit event and then the channel open output event.

What we'd expect in this case is that the fees for the tx were credited
to the channel's account, not the wallet. But since we got the two
in/out events first, the fees were accumulated there first.

Our existing logic will add the channel's fees correctly, but we weren't
zeroing out the wallet's balance once it'd been determined that they
were 'ineligble' so to speak, for being included in the fees that round.
2022-07-28 12:08:18 +09:30
..
test bkpr: update tests for wallet/external onchain fees 2022-07-28 12:08:18 +09:30
account.c bkpr: if we're missing info about an account, add in journal entry 2022-07-28 12:08:18 +09:30
account.h bkpr: if we're missing info about an account, add in journal entry 2022-07-28 12:08:18 +09:30
account_entry.c bkpr: use tags not str for tag originations 2022-07-28 12:08:18 +09:30
account_entry.h bkpr: use tags not str for tag originations 2022-07-28 12:08:18 +09:30
bookkeeper.c bkpr: parse the 'originating_account' field, save to event 2022-07-28 12:08:18 +09:30
chain_event.h bkpr: parse the 'originating_account' field, save to event 2022-07-28 12:08:18 +09:30
channel_event.c bkpr: if we're missing info about an account, add in journal entry 2022-07-28 12:08:18 +09:30
channel_event.h bkpr: if we're missing info about an account, add in journal entry 2022-07-28 12:08:18 +09:30
db.c bkpr: parse the 'originating_account' field, save to event 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
Makefile bkpr: use tags not str for tag originations 2022-07-28 12:08:18 +09:30
onchain_fee.h bkpr: put the account name on the event 2022-07-28 12:08:18 +09:30
recorder.c bkpr: cleanup wallet fee entries if decide they belong to a channel 2022-07-28 12:08:18 +09:30
recorder.h bkpr: dont count fees for channel closes if we're not the opener 2022-07-28 12:08:18 +09:30