[Lightning] 0-amount HODL invoices have null preimage. Is that normal?

What follows was observed using the Lighting Labs LND , but i think it happens with the LTC fork of it as well.

I am creating 0-amount HODL invoices via REST API https://localhost:8080/v2/invoices/hodl, like this one:








This is the output payment request:


lncli listinvoices shows r_preimage = null for invoices like that.

Is that ok?
Did i do everything correctly while creating the invoice?

I know i should not be using these type of invoices which are vulnerable according to Zero Amount Invoices - Suredbits, but in my case there is nothing to worry about, because i know in advance what amount the user is about to send me ( the user will pay via a LNURL-pay link, so the wallet will tell me the amount entered by the user via HTTP just before paying the invoice, thus i will know if i have to settle or cancel the HODL invoice based on the amount received).

I have paid it from another node and it is ACCEPTED now, so i guess it’s ok

1 Like

I think it’s best to ask on the lightning slack: http://lightningcommunity.slack.com/