mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 15:44:21 +01:00
lightningd: change msatoshi args to amount_msat.
This is consistent with our output changes, and increases consistency. It also keeps future sanity checks happy, that we only use JSON msat helpers with '_msat' fields. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice`: `msatoshi` argument is now called `amount_msat` to match other fields. Changelog-Deprecated: JSON-RPC: `invoice`, `sendonion`, `sendpay`, `pay`, `keysend`, `fetchinvoice`, `sendinvoice` `msatoshi` (use `amount_msat`)
This commit is contained in:
@@ -1147,7 +1147,7 @@ static struct command_result *json_invoice(struct command *cmd,
|
||||
info->cmd = cmd;
|
||||
|
||||
if (!param(cmd, buffer, params,
|
||||
p_req("msatoshi", param_positive_msat_or_any, &msatoshi_val),
|
||||
p_req("amount_msat|msatoshi", param_positive_msat_or_any, &msatoshi_val),
|
||||
p_req("label", param_label, &info->label),
|
||||
p_req("description", param_escaped_string, &desc_val),
|
||||
p_opt_def("expiry", param_time, &expiry, 3600*24*7),
|
||||
|
||||
@@ -1289,7 +1289,7 @@ static struct command_result *json_sendonion(struct command *cmd,
|
||||
p_opt_def("partid", param_u64, &partid, 0),
|
||||
/* FIXME: parameter should be invstring now */
|
||||
p_opt("bolt11", param_string, &invstring),
|
||||
p_opt_def("msatoshi", param_msat, &msat, AMOUNT_MSAT(0)),
|
||||
p_opt_def("amount_msat|msatoshi", param_msat, &msat, AMOUNT_MSAT(0)),
|
||||
p_opt("destination", param_node_id, &destination),
|
||||
p_opt("localofferid", param_sha256, &local_offer_id),
|
||||
p_opt("groupid", param_u64, &group),
|
||||
@@ -1441,7 +1441,7 @@ static struct command_result *json_sendpay(struct command *cmd,
|
||||
p_req("route", param_route_hops, &route),
|
||||
p_req("payment_hash", param_sha256, &rhash),
|
||||
p_opt("label", param_escaped_string, &label),
|
||||
p_opt("msatoshi", param_msat, &msat),
|
||||
p_opt("amount_msat|msatoshi", param_msat, &msat),
|
||||
/* FIXME: parameter should be invstring now */
|
||||
p_opt("bolt11", param_string, &invstring),
|
||||
p_opt("payment_secret", param_secret, &payment_secret),
|
||||
|
||||
Reference in New Issue
Block a user