Skip to content

Commit

Permalink
renepay: fix strange gossmap_refresh log
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Lagrang3 authored and ShahanaFarooqui committed Aug 12, 2024
1 parent 5e4eb7b commit 3f32f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/renepay/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static void memleak_mark(struct plugin *p, struct htable *memtable)
static const char *init(struct plugin *p,
const char *buf UNUSED, const jsmntok_t *config UNUSED)
{
size_t num_channel_updates_rejected;
size_t num_channel_updates_rejected = 0;

tal_steal(p, pay_plugin);
pay_plugin->plugin = p;
Expand Down
2 changes: 1 addition & 1 deletion plugins/renepay/mods.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static struct command_result *refreshgossmap_cb(struct payment *payment)
assert(payment);
assert(payment->local_gossmods);

size_t num_channel_updates_rejected;
size_t num_channel_updates_rejected = 0;
bool gossmap_changed =
gossmap_refresh(pay_plugin->gossmap, &num_channel_updates_rejected);

Expand Down

0 comments on commit 3f32f9e

Please sign in to comment.