mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
lightningd: use amount_msat not amount in htlc_accepted_hook.
Changelog-Added: Plugins: `htlc_accepted_hook` `amount_msat` field. Changelog-Deprecated: Plugins: `htlc_accepted_hook` `amount` field (use `amount_msat`) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
cd7e784d6f
commit
f6b4dbc65a
@ -1379,7 +1379,7 @@ The payload of the hook call has the following format:
|
||||
"htlc": {
|
||||
"short_channel_id": "4x5x6",
|
||||
"id": 27,
|
||||
"amount": "43msat",
|
||||
"amount_msat": "43msat",
|
||||
"cltv_expiry": 500028,
|
||||
"cltv_expiry_relative": 10,
|
||||
"payment_hash": "0000000000000000000000000000000000000000000000000000000000000000"
|
||||
|
@ -1071,7 +1071,9 @@ static void htlc_accepted_hook_serialize(struct htlc_accepted_hook_payload *p,
|
||||
json_object_start(s, "htlc");
|
||||
json_add_short_channel_id(s, "short_channel_id", hin->key.channel->scid);
|
||||
json_add_u64(s, "id", hin->key.id);
|
||||
json_add_amount_msat_only(s, "amount", hin->msat);
|
||||
if (deprecated_apis)
|
||||
json_add_amount_msat_only(s, "amount", hin->msat);
|
||||
json_add_amount_msat_only(s, "amount_msat", hin->msat);
|
||||
json_add_u32(s, "cltv_expiry", expiry);
|
||||
json_add_s32(s, "cltv_expiry_relative", expiry - blockheight);
|
||||
json_add_sha256(s, "payment_hash", &hin->payment_hash);
|
||||
|
Loading…
Reference in New Issue
Block a user