delforward: allow deletion of "unknown in_htlc_id" and fix autoclean to use it.

Note the caveats: we will delete *all* of them at once!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-27 09:13:36 +09:30
parent 6eac8dfe3c
commit 68f15f17bb
7 changed files with 74 additions and 22 deletions

View File

@@ -507,3 +507,10 @@ def test_db_forward_migrate(bitcoind, node_factory):
assert l1.rpc.getinfo()['fees_collected_msat'] == 4
assert len(l1.rpc.listforwards()['forwards']) == 4
# Make sure autoclean can handle these!
l1.stop()
l1.daemon.opts['autoclean-succeededforwards-age'] = 2
l1.daemon.opts['autoclean-cycle'] = 1
l1.start()
wait_for(lambda: l1.rpc.listforwards()['forwards'] == [])