common: fix bad cupdates count in gossmap.c

I noticed this in the logs:

```
lightningd-1 2026-01-28T00:27:37.504Z DEBUG   gossipd: gossip_store: Read 59428/118856/0/0 cannounce/cupdate/nannounce/delete from store in 45521871 bytes, now 45521849 bytes (populated=true)
lightningd-1 2026-01-28T00:27:37.504Z DEBUG   gossipd: Got 118856 bad cupdates, ignoring them (expected on mainnet)
```

That's weird, and turns out it counting good updates, not bad ones!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2026-02-18 10:22:49 +10:30
parent ab3e7c31e8
commit a84ad10820

View File

@@ -896,7 +896,7 @@ static bool map_catchup(struct gossmap *map,
return false;
map->num_live++;
} else if (type == WIRE_CHANNEL_UPDATE)
num_bad_cupdates += update_channel(map, off);
num_bad_cupdates += !update_channel(map, off);
else if (type == WIRE_GOSSIP_STORE_DELETE_CHAN)
remove_channel_by_deletemsg(map, off);
else if (type == WIRE_NODE_ANNOUNCEMENT)