diff --git a/plugins/pay.c b/plugins/pay.c index f682142ca275..d07814467c68 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1518,9 +1518,16 @@ static struct command_result *handle_channel_hint_update(struct command *cmd, { struct channel_hint *hint = channel_hint_from_json(NULL, buf, param); - plugin_log(cmd->plugin, LOG_DBG, "Received a channel_hint for scidd=%s", - fmt_short_channel_id_dir(tmpctx, &hint->scid)); - /* TODO: Apply the change to the channel_hint_set in `hints` */ + plugin_log(cmd->plugin, LOG_DBG, + "Received a channel_hint {.scid = %s, .enabled = %d, " + ".estimate = %s, .capacity = %s }", + fmt_short_channel_id_dir(tmpctx, &hint->scid), hint->enabled, + fmt_amount_msat(tmpctx, hint->estimated_capacity), + fmt_amount_sat(tmpctx, hint->capacity) + ); + channel_hint_set_add(global_hints, time_now().ts.tv_sec, &hint->scid, + hint->enabled, &hint->estimated_capacity, + hint->capacity, NULL); tal_free(hint); return notification_handled(cmd); }