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 <lagrang3@protonmail.com>
This commit is contained in:
Lagrang3 2024-06-11 07:59:25 +01:00 committed by ShahanaFarooqui
parent 5e4eb7bdc3
commit 3f32f9ea10
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);