mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
bkpr: exclude non-wallet events in the balance snapshot
Anchor outputs are ignored by the clightning wallet, but we keep track of them in the bookkeeper. This causes problems when we do the balance checks on restart w/ the balance_snapshot -- it results in us printing out a journal_entry to 'get rid of' the anchors that the clightning node doesnt know about. Instead, we mark some outputs as 'ignored' and exclude these from our account balance sums when we're comparing to the clightning snapshot.
This commit is contained in:
@@ -335,10 +335,13 @@ static void record_ignored_wallet_deposit(struct tracked_output *out)
|
||||
|
||||
static void record_anchor(struct tracked_output *out)
|
||||
{
|
||||
send_coin_mvt(take(new_coin_wallet_deposit(NULL,
|
||||
enum mvt_tag *tags = new_tag_arr(NULL, ANCHOR);
|
||||
tal_arr_expand(&tags, IGNORED);
|
||||
send_coin_mvt(take(new_coin_wallet_deposit_tagged(NULL,
|
||||
&out->outpoint,
|
||||
out->tx_blockheight,
|
||||
out->sat, ANCHOR)));
|
||||
out->sat,
|
||||
tags)));
|
||||
}
|
||||
|
||||
static void record_coin_movements(struct tracked_output *out,
|
||||
|
||||
Reference in New Issue
Block a user