Skip to content

Commit a84ad10

Browse files
committed
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>
1 parent ab3e7c3 commit a84ad10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/gossmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static bool map_catchup(struct gossmap *map,
896896
return false;
897897
map->num_live++;
898898
} else if (type == WIRE_CHANNEL_UPDATE)
899-
num_bad_cupdates += update_channel(map, off);
899+
num_bad_cupdates += !update_channel(map, off);
900900
else if (type == WIRE_GOSSIP_STORE_DELETE_CHAN)
901901
remove_channel_by_deletemsg(map, off);
902902
else if (type == WIRE_NODE_ANNOUNCEMENT)

0 commit comments

Comments
 (0)