lightningd: add invoice_amt to the htlc_accepted hook
This commit introduces a new field `invoice_msat` to the htlc_accepted hook. If this field is specified it will replace the amount of the invoice that belongs to the payment_hash of the HTLC on internal checks. This is useful in scenarios where we actually expect a smaller amount than initially specified in an invoice. Changelog-Changed: Plugins: `htlc_accepted` hook can now override the expected total amount of the invoice that belongs to the HTLC. Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
572c4553a2
commit
21fb7600f3
@@ -380,6 +380,7 @@ void htlc_set_add_(struct lightningd *ld UNNEEDED,
|
||||
struct logger *log UNNEEDED,
|
||||
struct amount_msat msat UNNEEDED,
|
||||
struct amount_msat total_msat UNNEEDED,
|
||||
const struct amount_msat *invoice_msat_override UNNEEDED,
|
||||
const struct sha256 *payment_hash UNNEEDED,
|
||||
const struct secret *payment_secret UNNEEDED,
|
||||
void (*fail)(void * UNNEEDED, const u8 *) UNNEEDED,
|
||||
|
||||
Reference in New Issue
Block a user