mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +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:
@@ -288,6 +288,19 @@ struct chain_coin_mvt *new_coin_wallet_deposit(const tal_t *ctx,
|
||||
amount, true);
|
||||
}
|
||||
|
||||
struct chain_coin_mvt *new_coin_wallet_deposit_tagged(const tal_t *ctx,
|
||||
const struct bitcoin_outpoint *outpoint,
|
||||
u32 blockheight,
|
||||
struct amount_sat amount,
|
||||
enum mvt_tag *tags TAKES)
|
||||
{
|
||||
return new_chain_coin_mvt_sat(ctx, WALLET, NULL,
|
||||
outpoint, NULL,
|
||||
blockheight,
|
||||
take(tags),
|
||||
amount, true);
|
||||
}
|
||||
|
||||
struct chain_coin_mvt *new_coin_wallet_withdraw(const tal_t *ctx,
|
||||
const struct bitcoin_txid *spend_txid,
|
||||
const struct bitcoin_outpoint *outpoint,
|
||||
|
||||
Reference in New Issue
Block a user