chaintopology: tell gossipd that channels no longer exist on reorg.

This actually caused the flake in test_funding_reorg_private, where
l1 and l2 might not mark the original channel disabled.  In fact, they
should *remove* it as it gets reorged out.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-08-12 12:35:55 +09:30
parent 405b914dd9
commit 66af5f8a28
7 changed files with 108 additions and 50 deletions

View File

@@ -1826,6 +1826,12 @@ struct db_query db_postgres_queries[] = {
.placeholders = 1,
.readonly = true,
},
{
.name = "SELECT blockheight, txindex, outnum FROM utxoset WHERE blockheight = ?",
.query = "SELECT blockheight, txindex, outnum FROM utxoset WHERE blockheight = $1",
.placeholders = 1,
.readonly = true,
},
{
.name = "SELECT blockheight FROM transactions WHERE id=?",
.query = "SELECT blockheight FROM transactions WHERE id=$1",
@@ -2020,10 +2026,10 @@ struct db_query db_postgres_queries[] = {
},
};
#define DB_POSTGRES_QUERY_COUNT 335
#define DB_POSTGRES_QUERY_COUNT 336
#endif /* HAVE_POSTGRES */
#endif /* LIGHTNINGD_WALLET_GEN_DB_POSTGRES */
// SHA256STAMP:27a166e040e517422e91cf7ffbd12426b34337b8d75f82d7aa4c448beae5e821
// SHA256STAMP:df06b800543e6bb886100ca428247ac1097f749098779dae43ba875154700f58