Skip to content

Commit a6bd708

Browse files
committed
gossipd: make sure we correctly move node announcement when *no* channel preceeds it in the gossip store.
We had the test backwards, so we moved it *all the time*. This bloats our gossip store, as well as not moving it in the case where we need to. Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: gossipd: we would occasionally not show a node announcement in listnodes().
1 parent 6285017 commit a6bd708

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

gossipd/gossmap_manage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void remove_channel(struct gossmap_manage *gm,
300300

301301
/* Maybe this was the last channel_announcement which preceeded node_announcement? */
302302
if (chan->cann_off < node->nann_off
303-
&& any_cannounce_preceeds_offset(gossmap, node, chan, node->nann_off)) {
303+
&& !any_cannounce_preceeds_offset(gossmap, node, chan, node->nann_off)) {
304304
const u8 *nannounce;
305305
u32 timestamp;
306306

tests/test_gossip.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2372,7 +2372,6 @@ def test_incoming_unreasonable(node_factory):
23722372
l3.rpc.listincoming()
23732373

23742374

2375-
@pytest.mark.xfail(strict=True)
23762375
def test_gossmap_lost_node(node_factory, bitcoind):
23772376
l1, l2, l3, l4 = node_factory.line_graph(4, wait_for_announce=True)
23782377

0 commit comments

Comments
 (0)