jsonrpc: Add msatoshi argument to sendonion to annotate

While not directly necessary, it still feeds the `listpays` result, and so we
should pass it along if we can, so we don't have to rely solely on the
`amount_sent` field, which includes the fees.

Reported-by: Rusty Russell <@rustyrussell>
This commit is contained in:
Christian Decker
2020-07-27 16:01:49 +02:00
committed by Rusty Russell
parent 1da977a04c
commit d7cca0781d
2 changed files with 4 additions and 1 deletions

View File

@@ -1029,6 +1029,7 @@ static struct command_result *payment_createonion_success(struct command *cmd,
json_object_end(req->js);
json_add_sha256(req->js, "payment_hash", p->payment_hash);
json_add_amount_msat_only(req->js, "msatoshi", p->amount);
json_array_start(req->js, "shared_secrets");
secrets = p->createonion_response->shared_secrets;