Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong warning on invoice generation #3198

Closed
darosior opened this issue Oct 22, 2019 · 4 comments · Fixed by #3351
Closed

Wrong warning on invoice generation #3198

darosior opened this issue Oct 22, 2019 · 4 comments · Fixed by #3351
Labels
good first issue good for onboarding

Comments

@darosior
Copy link
Contributor

We get a wrong warning when using the invoice command, it doesn't hurt but might confuse an user :

{
   "payment_hash": "cfcc26a007e4aa3421170bf84ab22945e79abe0e53c43d36d511d202a9deb291",
   "expires_at": 1572345937,
   "bolt11": "lnbcrt10u1pw6ahw3pp5elxzdgq8uj4rggghp0uy4v3fghne40sw20zr6dk4z8fq92w7k2gsdqzvyxqyjw5qcqp2h0wmluyw35gq8hczc5v8lgmsz38tftktgqjgjuge8g3f0tf33ypq8q699ztcelftak83qhy58e2znqw8mkkef0ysgppxesdk2vffausp5e4adf",
   "warning_capacity": "No channel with a peer that is not a dead end, has sufficient incoming capacity"
}

Though you can pay it :

{
   "id": 1,
   "payment_hash": "cfcc26a007e4aa3421170bf84ab22945e79abe0e53c43d36d511d202a9deb291",
   "destination": "02e010ef6ce9811f3e3e5310d676861eb75629b98f1e818f78a7b5af956263ae58",
   "msatoshi": 1000000,
   "amount_msat": "1000000msat",
   "msatoshi_sent": 1000000,
   "amount_sent_msat": "1000000msat",
   "created_at": 1571741143,
   "status": "complete",
   "payment_preimage": "5b69dc9bf6d5ba660b6435ec90d8e4aff9c6e5d0f7da975dafa99f6d0d517f6c",
   "bolt11": "lnbcrt10u1pw6ahw3pp5elxzdgq8uj4rggghp0uy4v3fghne40sw20zr6dk4z8fq92w7k2gsdqzvyxqyjw5qcqp2h0wmluyw35gq8hczc5v8lgmsz38tftktgqjgjuge8g3f0tf33ypq8q699ztcelftak83qhy58e2znqw8mkkef0ysgppxesdk2vffausp5e4adf"
}

Maybe a good first issue ?

@niftynei niftynei added the good first issue good for onboarding label Oct 22, 2019
@niftynei niftynei changed the title [Good first issue] Wrong warning on invoice generation Wrong warning on invoice generation Oct 22, 2019
@m-schmoock
Copy link
Collaborator

Hm... What is the suggestion, just other wording like "No channel with a peer that is not a dead end, has sufficient incoming capacity. The payment may still be possible because our gossip is outdated."

The warning seems legit, as from a point of the invoicing node, the sender should not be able to complete this payment. The nodes gossip maybe incorrect and it is still possible, that's why you can pay it (sometimes).

@darosior
Copy link
Contributor Author

Hmm not sure since that's been a while but I think in that example I was directly connected..

@darosior
Copy link
Contributor Author

darosior commented Nov 22, 2019

Ok just tested and it shows this message even if directly connected, so not a gossip thing.

$ lcreg2 listfunds
{
   "outputs": [
      {
         "txid": "5919c71379d9fb19df6e8fc345b6e3fe3be9fb3a67218e756768f8a733b5b3d9",
         "output": 0,
         "value": 1000000000,
         "amount_msat": "1000000000000msat",
         "address": "bcrt1qgqnwywvh3kdydnagn22lcta8q4memsqw9daefk",
         "status": "confirmed",
         "blockheight": 250
      }
   ],
   "channels": [
      {
         "peer_id": "0370173d66b9b5e2992d0148af198d8f21459a8209c86c858156e6fff8e7d7e6a5",
         "connected": true,
         "state": "CHANNELD_NORMAL",
         "short_channel_id": "256x1x0",
         "channel_sat": 0,
         "our_amount_msat": "0msat",
         "channel_total_sat": 100000,
         "amount_msat": "100000000msat",
         "funding_txid": "9f2bc22f62af10424fa37de1b386dfde575db8c54939c3640996d52b4599a884",
         "funding_output": 0
      }
   ]
}
$ lcreg2 invoice 1000 b a
{
   "payment_hash": "1582137debd37560edf6727e3ab3f32d1fce91f3bc9cde78a178c14d5df142d5",
   "expires_at": 1575027557,
   "bolt11": "lnbcrt10n1pwa0j89pp5zkppxl0t6d6kpm0kwflr4vln950uay0nhjwdu79p0rq56h03gt2sdqzvyxqyjw5qcqp2mnvpt4rrq3n2vkjd9p6tttpmred8eugn5s5nltdms345whxrg63h023dgjr550ad5tlunqy2lkfk9gcatat7z98j9udsnyr6gs0z85qpgl5zf0",
   "warning_capacity": "No channel with a peer that is not a dead end, has sufficient incoming capacity"
}

@Coinomatron
Copy link

Coinomatron commented Nov 26, 2019

I opened a channel from LNbig to my node (4000000000 msat) and also got this warning when requesting an invoice. Haven't paid the invoice yet, but it's kind of puzzling, since I presume my node should have enough inbound capacity. If not, how do I change that?

Edit, invoice generation gives that error, but the invoice list doesn't display this error.
Edit2, after restart of lightningd with rebalance, error is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good for onboarding
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants