From 9b1a0f9b7bb8752a770eab3c52b50f5e8c4a308b Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 10 Nov 2021 15:43:23 -0600 Subject: [PATCH] coin-moves: remove penalty + chain fee types FIXME: still has coin tracking stuff! --- common/coin_mvt.c | 6 ++---- common/coin_mvt.h | 4 ++-- doc/PLUGINS.md | 5 +---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/common/coin_mvt.c b/common/coin_mvt.c index 537c1231f..8851202b1 100644 --- a/common/coin_mvt.c +++ b/common/coin_mvt.c @@ -16,14 +16,12 @@ const char *mvt_type_str(enum mvt_type type) static const char *mvt_tags[] = { "deposit", "withdrawal", - "chain_fees", "penalty", "invoice", "routed", "journal_entry", "onchain_htlc", "pushed", - "spend_track", }; const char *mvt_tag_str(enum mvt_tag tag) { @@ -153,7 +151,7 @@ struct chain_coin_mvt *new_coin_chain_fees(const tal_t *ctx, { return new_chain_coin_mvt(ctx, account_name, tx_txid, NULL, NULL, blockheight, - CHAIN_FEES, amount, false); + 0, amount, false); } struct chain_coin_mvt *new_coin_chain_fees_sat(const tal_t *ctx, @@ -265,7 +263,7 @@ struct chain_coin_mvt *new_coin_spend_track(const tal_t *ctx, u32 blockheight) { return new_chain_coin_mvt_sat(ctx, "wallet", txid, outpoint, - NULL, blockheight, SPEND_TRACK, AMOUNT_SAT(0), + NULL, blockheight, 0, AMOUNT_SAT(0), false); } diff --git a/common/coin_mvt.h b/common/coin_mvt.h index 7c406c0f0..8225fb752 100644 --- a/common/coin_mvt.h +++ b/common/coin_mvt.h @@ -17,14 +17,14 @@ enum mvt_type { enum mvt_tag { DEPOSIT = 0, WITHDRAWAL = 1, - CHAIN_FEES = 2, + /* 2, CHAIN_FEES has been removed */ PENALTY = 3, INVOICE = 4, ROUTED = 5, JOURNAL = 6, ONCHAIN_HTLC = 7, PUSHED = 8, - SPEND_TRACK = 9, + /* 9, SPEND_TRACK has been removed */ }; struct channel_coin_mvt { diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index 07e045374..bb54cf952 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -734,8 +734,7 @@ all channel funds' account are the channel id. `txid` is the transaction id of the bitcoin transaction that triggered this ledger event. `utxo_txid` and `vout` identify the bitcoin output which triggered -this notification. (`chain_mvt` only) In most cases, the `utxo_txid` will be the -same as the `txid`, except for `spend_track` notficiations. Notifications tagged +this notification. (`chain_mvt` only). Notifications tagged `chain_fees` and `journal_entry` do not have a `utxo_txid` as they're not represented in the utxo set. @@ -755,7 +754,6 @@ multiple times. `channel_mvt` only `tag` is a movement descriptor. Current tags are as follows: - `deposit`: funds deposited - `withdrawal`: funds withdrawn - - `chain_fees`: funds paid for onchain fees. `chain_mvt` only - `penalty`: funds paid or gained from a penalty tx. `chain_mvt` only - `invoice`: funds paid to or recieved from an invoice. `channel_mvt` only - `routed`: funds routed through this node. `channel_mvt` only @@ -763,7 +761,6 @@ multiple times. `channel_mvt` only by a penalty tx onchain. `chain_mvt` only - `onchain_htlc`: funds moved via an htlc onchain. `chain_mvt` only - `pushed`: funds pushed to peer. `channel_mvt` only. - - `spend_track`: informational notification about a wallet utxo spend. `chain_mvt` only. `blockheight` is the block the txid is included in. `chain_mvt` only. In the case that an output is considered dust, c-lightning does not track its return to