db: correctly migrate forwards for closed incoming channels.

We have to allow them (as otherwise `fees_collected_msat` in getinfo breaks),
but it means that actually, in_htlc_id might be missing in listforwards
(also, out_htlc_id might be missing, which we didn't catch before).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #5628
This commit is contained in:
Rusty Russell
2022-09-27 09:13:35 +09:30
parent 9023bd9334
commit cafa1a8c65
11 changed files with 55 additions and 47 deletions

View File

@@ -469,7 +469,6 @@ def test_db_sanity_checks(bitcoind, node_factory):
assert l1.daemon.is_in_stderr('Wallet sanity check failed')
@pytest.mark.xfail(strict=True)
@unittest.skipIf(os.getenv('TEST_DB_PROVIDER', 'sqlite3') != 'sqlite3', "Canned db used")
@unittest.skipIf(not COMPAT, "needs COMPAT to convert obsolete db")
@unittest.skipIf(TEST_NETWORK != 'regtest', "The DB migration is network specific due to the chain var.")