mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
coin_mvt: record new 'fees' field on htlc channel moves
We record the amount of fees collected for a routed payment. For simplicity's sake on the data agg side, we record the fee payment on *BOTH* the incoming htlc and the outgoing htlc. Note that this results in double counting if you add up the fees from both an in-routed and out-routed payment.
This commit is contained in:
@@ -1888,17 +1888,17 @@ def test_coin_movement_notices(node_factory, bitcoind, chainparams):
|
||||
|
||||
l1_l2_mvts = [
|
||||
{'type': 'chain_mvt', 'credit': 0, 'debit': 0, 'tags': ['channel_open']},
|
||||
{'type': 'channel_mvt', 'credit': 100001001, 'debit': 0, 'tags': ['routed']},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 50000000, 'tags': ['routed']},
|
||||
{'type': 'channel_mvt', 'credit': 100000000, 'debit': 0, 'tags': ['invoice']},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 50000000, 'tags': ['invoice']},
|
||||
{'type': 'channel_mvt', 'credit': 100001001, 'debit': 0, 'tags': ['routed'], 'fees': '1001msat'},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 50000000, 'tags': ['routed'], 'fees': '501msat'},
|
||||
{'type': 'channel_mvt', 'credit': 100000000, 'debit': 0, 'tags': ['invoice'], 'fees': '0msat'},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 50000000, 'tags': ['invoice'], 'fees': '0msat'},
|
||||
{'type': 'chain_mvt', 'credit': 0, 'debit': 100001001, 'tags': ['channel_close']},
|
||||
]
|
||||
|
||||
l2_l3_mvts = [
|
||||
{'type': 'chain_mvt', 'credit': 1000000000, 'debit': 0, 'tags': ['channel_open', 'opener']},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 100000000, 'tags': ['routed']},
|
||||
{'type': 'channel_mvt', 'credit': 50000501, 'debit': 0, 'tags': ['routed']},
|
||||
{'type': 'channel_mvt', 'credit': 0, 'debit': 100000000, 'tags': ['routed'], 'fees': '1001msat'},
|
||||
{'type': 'channel_mvt', 'credit': 50000501, 'debit': 0, 'tags': ['routed'], 'fees': '501msat'},
|
||||
{'type': 'chain_mvt', 'credit': 0, 'debit': 950000501, 'tags': ['channel_close']},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user