From 9be4d552fa745d34738ee5a0a2088ec99e85ada2 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 12 Jul 2020 14:30:49 +0200 Subject: [PATCH] paymod: Add a bit more information to the `pay` response Amount, parent_part_id and own partid can be helpful when debugging. --- plugins/libplugin-pay.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 0fa9aee41..18bc0dbaf 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -1015,6 +1015,11 @@ static void payment_add_attempt(struct json_stream *s, const char *fieldname, st if (p->failreason != NULL) json_add_string(s, "failreason", p->failreason); + json_add_u64(s, "partid", p->partid); + json_add_amount_msat_only(s, "amount", p->amount); + if (p->parent != NULL) + json_add_u64(s, "parent_partid", p->parent->partid); + json_object_end(s); for (size_t i=0; ichildren); i++) { payment_add_attempt(s, fieldname, p->children[i], recurse);