mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-26 20:30:59 +01:00
coin-moves: remove penalty + chain fee types
FIXME: still has coin tracking stuff!
This commit is contained in:
parent
6cee603f71
commit
9b1a0f9b7b
3 changed files with 5 additions and 10 deletions
|
@ -16,14 +16,12 @@ const char *mvt_type_str(enum mvt_type type)
|
||||||
static const char *mvt_tags[] = {
|
static const char *mvt_tags[] = {
|
||||||
"deposit",
|
"deposit",
|
||||||
"withdrawal",
|
"withdrawal",
|
||||||
"chain_fees",
|
|
||||||
"penalty",
|
"penalty",
|
||||||
"invoice",
|
"invoice",
|
||||||
"routed",
|
"routed",
|
||||||
"journal_entry",
|
"journal_entry",
|
||||||
"onchain_htlc",
|
"onchain_htlc",
|
||||||
"pushed",
|
"pushed",
|
||||||
"spend_track",
|
|
||||||
};
|
};
|
||||||
const char *mvt_tag_str(enum mvt_tag tag)
|
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,
|
return new_chain_coin_mvt(ctx, account_name, tx_txid,
|
||||||
NULL, NULL, blockheight,
|
NULL, NULL, blockheight,
|
||||||
CHAIN_FEES, amount, false);
|
0, amount, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct chain_coin_mvt *new_coin_chain_fees_sat(const tal_t *ctx,
|
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)
|
u32 blockheight)
|
||||||
{
|
{
|
||||||
return new_chain_coin_mvt_sat(ctx, "wallet", txid, outpoint,
|
return new_chain_coin_mvt_sat(ctx, "wallet", txid, outpoint,
|
||||||
NULL, blockheight, SPEND_TRACK, AMOUNT_SAT(0),
|
NULL, blockheight, 0, AMOUNT_SAT(0),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,14 @@ enum mvt_type {
|
||||||
enum mvt_tag {
|
enum mvt_tag {
|
||||||
DEPOSIT = 0,
|
DEPOSIT = 0,
|
||||||
WITHDRAWAL = 1,
|
WITHDRAWAL = 1,
|
||||||
CHAIN_FEES = 2,
|
/* 2, CHAIN_FEES has been removed */
|
||||||
PENALTY = 3,
|
PENALTY = 3,
|
||||||
INVOICE = 4,
|
INVOICE = 4,
|
||||||
ROUTED = 5,
|
ROUTED = 5,
|
||||||
JOURNAL = 6,
|
JOURNAL = 6,
|
||||||
ONCHAIN_HTLC = 7,
|
ONCHAIN_HTLC = 7,
|
||||||
PUSHED = 8,
|
PUSHED = 8,
|
||||||
SPEND_TRACK = 9,
|
/* 9, SPEND_TRACK has been removed */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct channel_coin_mvt {
|
struct channel_coin_mvt {
|
||||||
|
|
|
@ -734,8 +734,7 @@ all channel funds' account are the channel id.
|
||||||
|
|
||||||
`txid` is the transaction id of the bitcoin transaction that triggered this
|
`txid` is the transaction id of the bitcoin transaction that triggered this
|
||||||
ledger event. `utxo_txid` and `vout` identify the bitcoin output which triggered
|
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
|
this notification. (`chain_mvt` only). Notifications tagged
|
||||||
same as the `txid`, except for `spend_track` notficiations. Notifications tagged
|
|
||||||
`chain_fees` and `journal_entry` do not have a `utxo_txid` as they're not
|
`chain_fees` and `journal_entry` do not have a `utxo_txid` as they're not
|
||||||
represented in the utxo set.
|
represented in the utxo set.
|
||||||
|
|
||||||
|
@ -755,7 +754,6 @@ multiple times. `channel_mvt` only
|
||||||
`tag` is a movement descriptor. Current tags are as follows:
|
`tag` is a movement descriptor. Current tags are as follows:
|
||||||
- `deposit`: funds deposited
|
- `deposit`: funds deposited
|
||||||
- `withdrawal`: funds withdrawn
|
- `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
|
- `penalty`: funds paid or gained from a penalty tx. `chain_mvt` only
|
||||||
- `invoice`: funds paid to or recieved from an invoice. `channel_mvt` only
|
- `invoice`: funds paid to or recieved from an invoice. `channel_mvt` only
|
||||||
- `routed`: funds routed through this node. `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
|
by a penalty tx onchain. `chain_mvt` only
|
||||||
- `onchain_htlc`: funds moved via an htlc onchain. `chain_mvt` only
|
- `onchain_htlc`: funds moved via an htlc onchain. `chain_mvt` only
|
||||||
- `pushed`: funds pushed to peer. `channel_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
|
`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
|
case that an output is considered dust, c-lightning does not track its return to
|
||||||
|
|
Loading…
Add table
Reference in a new issue