Skip to content

Commit 3f32f9e

Browse files
Lagrang3ShahanaFarooqui
authored andcommitted
renepay: fix strange gossmap_refresh log
Often I find this in the logs: DEBUG plugin-cln-renepay: gossmap ignored 94692259263600 channel updates Apparently gossmap_refresh does not initialize the input variable num_channel_updates_rejected. Fix this by explicitely initializing it before calling gossmap_refresh. Signed-off-by: Lagrang3 <[email protected]>
1 parent 5e4eb7b commit 3f32f9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/renepay/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void memleak_mark(struct plugin *p, struct htable *memtable)
3838
static const char *init(struct plugin *p,
3939
const char *buf UNUSED, const jsmntok_t *config UNUSED)
4040
{
41-
size_t num_channel_updates_rejected;
41+
size_t num_channel_updates_rejected = 0;
4242

4343
tal_steal(p, pay_plugin);
4444
pay_plugin->plugin = p;

plugins/renepay/mods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static struct command_result *refreshgossmap_cb(struct payment *payment)
461461
assert(payment);
462462
assert(payment->local_gossmods);
463463

464-
size_t num_channel_updates_rejected;
464+
size_t num_channel_updates_rejected = 0;
465465
bool gossmap_changed =
466466
gossmap_refresh(pay_plugin->gossmap, &num_channel_updates_rejected);
467467

0 commit comments

Comments
 (0)