mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-21 22:14:20 +01:00
sendpay: add payment_metadata argument.
And document the missing arguments. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -71,7 +71,8 @@ u8 *onion_final_hop(const tal_t *ctx,
|
||||
struct amount_msat total_msat,
|
||||
const struct pubkey *blinding,
|
||||
const u8 *enctlv,
|
||||
const struct secret *payment_secret)
|
||||
const struct secret *payment_secret,
|
||||
const u8 *payment_metadata)
|
||||
{
|
||||
struct tlv_tlv_payload *tlv = tlv_tlv_payload_new(tmpctx);
|
||||
struct tlv_tlv_payload_payment_data tlv_pdata;
|
||||
@@ -102,6 +103,7 @@ u8 *onion_final_hop(const tal_t *ctx,
|
||||
tlv_pdata.total_msat = total_msat.millisatoshis; /* Raw: TLV convert */
|
||||
tlv->payment_data = &tlv_pdata;
|
||||
}
|
||||
tlv->payment_metadata = cast_const(u8 *, payment_metadata);
|
||||
#if EXPERIMENTAL_FEATURES
|
||||
tlv->blinding_point = cast_const(struct pubkey *, blinding);
|
||||
tlv->encrypted_recipient_data = cast_const(u8 *, enctlv);
|
||||
|
||||
@@ -36,14 +36,15 @@ u8 *onion_nonfinal_hop(const tal_t *ctx,
|
||||
const struct pubkey *blinding,
|
||||
const u8 *enctlv);
|
||||
|
||||
/* Note that this can fail if we supply payment_secret and !use_tlv! */
|
||||
/* Note that this can fail if we supply payment_secret or payment_metadata and !use_tlv! */
|
||||
u8 *onion_final_hop(const tal_t *ctx,
|
||||
struct amount_msat forward,
|
||||
u32 outgoing_cltv,
|
||||
struct amount_msat total_msat,
|
||||
const struct pubkey *blinding,
|
||||
const u8 *enctlv,
|
||||
const struct secret *payment_secret);
|
||||
const struct secret *payment_secret,
|
||||
const u8 *payment_metadata);
|
||||
|
||||
/**
|
||||
* onion_payload_length: measure payload length in decrypted onion.
|
||||
|
||||
Reference in New Issue
Block a user