From 4d27d289848a1388eda24b9de8a4e02b8a2e76a7 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 19 Jul 2020 21:37:00 +0200 Subject: [PATCH] paymod: Add a log entry whenever we add a channel hint Mainly used for testing so we make sure we exclude or constrain the correct channels. Test to follow. --- plugins/libplugin-pay.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 602d56c98..ebb013198 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -619,6 +619,14 @@ static void channel_hints_update(struct payment *root, hint.scid.dir = direction; hint.estimated_capacity = estimated_capacity; tal_arr_expand(&root->channel_hints, hint); + + plugin_log( + root->plugin, LOG_DBG, + "Added a channel hint for %s: enabled %s, estimated capacity %s", + type_to_string(tmpctx, struct short_channel_id_dir, &hint.scid), + hint.enabled ? "true" : "false", + type_to_string(tmpctx, struct amount_msat, + &hint.estimated_capacity)); } /* Try to infer the erring_node, erring_channel and erring_direction from what