[c-lightning] [Lightning-dev] lookupinvoice
rusty at rustcorp.com.au
Tue Nov 27 07:03:01 AEDT 2018
[ Redirected to c-lightning list where it belongs ]
Sarat G <sarath.ginjupalli89 at gmail.com> writes:
> Hi Rusty,
> Thanks for your reply.
> I'm using the C lightning repo for my project(
> https://github.com/ElementsProject/lightning). Sorry, I framed the question
> wrongly. Yes, I can use listinvoices to look up for the invoices created at
> the node.
> My scenario is something like this, I'm looking up whether an invoice gets
> paid or not at the receiver end. For that at this point, I'm calling
> waitinvoice to see whether an invoice gets paid or not. I would like to
> know is there any way that the receiver could be aware that the particular
> invoice created by it paid or not.
> The problem is using waitinvoice in my case, it's making my process hang
> till the invoice gets paid. Some workaround which I'm using for this
> problem is I'm looking up the difference in amount of the label
> "msatoshi_to_us" while running the listpeers command.
listinvoice 'label' will let you poll the state of the invoice, which
In the latest version (not yet released) you can do waitinvoice and
still issue commands. We may put a limit on how many things you can
be waiting on, however, since it's a potential DoS.
More information about the c-lightning