core-lightning/tests
niftynei 5f41d9247e bkpr: properly account for onchain fees for channel closes
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])
2022-07-28 12:08:18 +09:30
..
data inflights: save the whole psbt to the database 2021-05-24 12:17:48 +09:30
fuzz fuzz: fix fuzzing compilation. 2022-07-25 08:08:32 -07:00
plugins Makefile: use a library archive for CCAN 2022-07-17 08:51:02 +09:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py tests: add marker for v1/v2 channel opens 2021-05-12 11:25:41 +09:30
db.py pytest: don't copy db to query it. 2021-08-26 12:44:02 +09:30
fixtures.py pytest: set dblog-file when adding the dblog plugin (TEST_CHECK_DBSTMTS=1) 2022-07-26 09:33:40 -07:00
test_cln_rs.py pytest: Move generated grpc bindings to pyln-testing 2022-07-21 14:19:06 +09:30
test_closing.py bkpr: properly account for onchain fees for channel closes 2022-07-28 12:08:18 +09:30
test_connection.py pytest: fix flake in test_wumbo_channels 2022-07-27 19:31:04 +09:30
test_db.py pytest: don't redirect stderr by default. 2022-07-21 15:37:05 -05:00
test_gossip.py pytest: don't redirect stderr by default. 2022-07-21 15:37:05 -05:00
test_invoices.py plugin: autoclean fix double free when re-enable, remove xfail mark from test_ 2022-07-16 14:19:05 +09:30
test_misc.py tests: local flake fix; l1 was waiting too long to reconnect 2022-07-26 15:11:30 -07:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py flake: permit test_v2_open_sigs_restart_while_dead to succeed/fail 2022-07-27 19:31:04 +09:30
test_pay.py sendpay: allow route to contain both amount_msat and (deprecated) msatoshi. 2022-07-12 12:42:05 -05:00
test_plugin.py pytest: fix test_commando_rune flake. 2022-07-26 09:48:56 -07:00
test_wallet.py hsmtool: implement checkhsm. 2022-07-22 16:57:27 +02:00
utils.py bolt: Reflect the zeroconf featurebits in code 2022-07-04 22:14:06 +02:00
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30