mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
onchain fees are weird at channel close because: - you may be missing an trimmed htlc (which went to fees) - the balance from close may have been rounded (msats cant land on chain) - the close might have been a past state and you've actually ended up with more money onchain than you had in the channel. wut This commit accounts for all of this appropriately, with some tests. channel_close.debit should equal onchain_fee.credit (for that txid) plus sum(chain_event.credit [wallet/channel_acct]). In the penalty case, channel_close.debit becomes channel_close.debit + penalty_adj.debit, i.e. channel-close.debit + (penalty_adj.debit) = onchain_fee.credit + sum(chain_event.credit [wallet/channel_acct]) |
||
---|---|---|
.. | ||
data | ||
fuzz | ||
plugins | ||
vectors | ||
benchmark.py | ||
conftest.py | ||
db.py | ||
fixtures.py | ||
test_cln_rs.py | ||
test_closing.py | ||
test_connection.py | ||
test_db.py | ||
test_gossip.py | ||
test_invoices.py | ||
test_misc.py | ||
test_onion.py | ||
test_opening.py | ||
test_pay.py | ||
test_plugin.py | ||
test_wallet.py | ||
utils.py | ||
valgrind-suppressions.txt |