Skip to content

[bug]: amt_msat ignored when sending a payment #10541

@NicolasDorier

Description

@NicolasDorier

Pre-Submission Checklist

  • I have searched the existing issues and believe this is a new bug.
  • I am not asking a question about how to use lnd, but reporting a bug (otherwise open a discussion).

LND Version

v0.19.3-beta

LND Configuration

Not relevant

Backend Version

bitcoin:29.1

Backend Configuration

Not relevant

OS/Distribution

Docker

Bug Details & Steps to Reproduce

It seems LND ignores "amt_msat":"1100000" while sending payment through rest (/v1/channels/transactions)

In this example, a BOLT11 of 1000000 msat needs to be paid, and I want to send 1100000 instead.
But only 1000000 is actually sent.

Request

{
    "amt_msat":"1100000",
    "payment_request":"lnbcrt10u1p5crgwjpp5gwfh8wfw4gjy6q909zus6xr9zr6unh3y2z88wndk2sg0umh3pyhqdq9dpjhjcqzzsxqzpusp5lyd4r5xsflg4m6zd4zhd0yr2exnka2s0dmug0cdtvj4snc30t70q9qxpqysgqe44yup6yhsmnrdhnkwhj55ed92j3kh0gvyagnpdguj3324nssg23au94wg3xq5s5hfyvhmxdfe53mzfns7aere4dpryypnct0kqedpcqh0y665",
    "allow_self_payment":true
}

Response:

{
  "payment_error": "",
  "payment_preimage": "OYHcks3KmuEnZKBGOPbTdqg3do/Loyb+HX6mEhwAyKk=",
  "payment_route": {
    "total_time_lock": 467,
    "total_fees": "0",
    "total_amt": "1000",
    "hops": [
      {
        "chan_id": "409018325598208",
        "chan_capacity": "16777215",
        "amt_to_forward": "1000",
        "fee": "0",
        "expiry": 461,
        "amt_to_forward_msat": "1000011",
        "fee_msat": "11",
        "pub_key": "0216d3c775d25d201a381514760b69a433b0cd347e9fc98c4c40f4f89bbff3fd86",
        "tlv_payload": true,
        "mpp_record": null,
        "amp_record": null,
        "custom_records": {},
        "metadata": "",
        "blinding_point": "",
        "encrypted_data": "",
        "total_amt_msat": "0"
      },
      {
        "chan_id": "123145302376448",
        "chan_capacity": "16777215",
        "amt_to_forward": "1000",
        "fee": "0",
        "expiry": 455,
        "amt_to_forward_msat": "1000000",
        "fee_msat": "11",
        "pub_key": "029a7c272059a007ac88c99593b91c8b1f77bb9134c32675a5c2837f90c540948f",
        "tlv_payload": true,
        "mpp_record": null,
        "amp_record": null,
        "custom_records": {},
        "metadata": "",
        "blinding_point": "",
        "encrypted_data": "",
        "total_amt_msat": "0"
      },
      {
        "chan_id": "124244814004224",
        "chan_capacity": "16777215",
        "amt_to_forward": "1000",
        "fee": "0",
        "expiry": 455,
        "amt_to_forward_msat": "1000000",
        "fee_msat": "0",
        "pub_key": "02b7b767780e0949d09d08998144d3b1fce8bc06fcea580a76a7d7889105210b98",
        "tlv_payload": true,
        "mpp_record": {
          "payment_addr": "+RtR0NBP0V3oTaiu15Bqyaduqg9u+Ifhq2SrCeIvX54=",
          "total_amt_msat": "1000000"
        },
        "amp_record": null,
        "custom_records": {},
        "metadata": "",
        "blinding_point": "",
        "encrypted_data": "",
        "total_amt_msat": "0"
      }
    ],
    "total_fees_msat": "22",
    "total_amt_msat": "1000022",
    "first_hop_amount_msat": "1000022",
    "custom_channel_data": ""
  },
  "payment_hash": "Q5NzuS6qJE0Aryi5DRhlEPXJ3iRQjndNtlQQ/m7xCS4="
}

Expected Behavior

If the user wants to over pay the BOLT11, he should be able to use amt_msat for this.

Debug Information

No response

Environment

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions