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
@@ -462,6 +462,8 @@ It can also specify `forward_to` in the response, replacing the destination. Th
|
||||
|
||||
Also, it can specify `extra_tlvs` in the response. This will replace the TLV-stream `update_add_htlc_tlvs` in the `update_add_htlc` message for forwarded htlcs.
|
||||
|
||||
If the node is the final destination, the plugin can also replace the amount of the invoice that belongs to the `payment_hash` by specifying `invoice_msat`.
|
||||
|
||||
```json
|
||||
{
|
||||
"result": "fail",
|
||||
|
||||
Reference in New Issue
Block a user