From f1172254360214e3e04eaf9a701aaef4b535304c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2022 19:52:09 +0930 Subject: [PATCH] pay: use amount_msat for amount report inside attempts. Nobody really parses this though, fortunately. Signed-off-by: Rusty Russell Changelog-Added: JSON-RPC: `pay` `attempts` `amount_msat` field. Changelog-Deprecated: JSON-RPC: `pay` `attempts` `amount` field (use `amount_msat`). --- plugins/pay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/pay.c b/plugins/pay.c index 142ae44a7..0ccde645b 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -642,7 +642,9 @@ static void payment_add_attempt(struct json_stream *s, const char *fieldname, st json_add_string(s, "failreason", p->failreason); json_add_u64(s, "partid", p->partid); - json_add_amount_msat_only(s, "amount", p->amount); + if (deprecated_apis) + json_add_amount_msat_only(s, "amount", p->amount); + json_add_amount_msat_only(s, "amount_msat", p->amount); if (p->parent != NULL) json_add_u64(s, "parent_partid", p->parent->partid);