From 2d93ddbdf1f8e2a2ea3145b234d28d927f255183 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 31 Jan 2024 13:46:16 +1030 Subject: [PATCH] gossipd: get told about new block before splicing code tries to feed us channel_announcement. ``` lightningd-2 2023-11-21T01:02:31.375Z DEBUG gossipd: Ignoring future channel_announcment for 109x1x0 (current block 108) lightningd-2 2023-11-21T01:02:31.375Z DEBUG gossipd: REPLY WIRE_GOSSIPD_ADDGOSSIP_REPLY with 0 fds lightningd-2 2023-11-21T01:02:31.376Z DEBUG gossipd: Bad gossip order: WIRE_CHANNEL_UPDATE before announcement 109x1x0/0 from local lightningd-2 2023-11-21T01:02:31.376Z DEBUG 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-hsmd: Got WIRE_HSMD_CHECK_OUTPOINT lightningd-2 2023-11-21T01:02:31.376Z DEBUG gossipd: REPLY WIRE_GOSSIPD_ADDGOSSIP_REPLY with 0 fds lightningd-2 2023-11-21T01:02:31.376Z DEBUG hsmd: Client: Received message 32 from client lightningd-2 2023-11-21T01:02:31.376Z DEBUG gossipd: REPLY WIRE_GOSSIPD_NEW_BLOCKHEIGHT_REPLY with 0 fd s ``` Signed-off-by: Rusty Russell --- lightningd/chaintopology.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightningd/chaintopology.c b/lightningd/chaintopology.c index 9b67077c7..4b127999b 100644 --- a/lightningd/chaintopology.c +++ b/lightningd/chaintopology.c @@ -854,12 +854,12 @@ void topology_add_sync_waiter_(const tal_t *ctx, static void updates_complete(struct chain_topology *topo) { if (!bitcoin_blkid_eq(&topo->tip->blkid, &topo->prev_tip)) { - /* Tell watch code to re-evaluate all txs. */ - watch_topology_changed(topo); - /* Tell lightningd about new block. */ notify_new_block(topo->bitcoind->ld, topo->tip->height); + /* Tell watch code to re-evaluate all txs. */ + watch_topology_changed(topo); + /* Maybe need to rebroadcast. */ rebroadcast_txs(topo);