faraday icon indicating copy to clipboard operation
faraday copied to clipboard

Audit fails if AMP invoices are present

Open rkfg opened this issue 3 years ago • 0 comments

frcli audit doesn't work due to "invalid" invoices with missing preimage. From what I see this happens when you send AMP invoices (I used them to rebalance my own channels sending to myself). Other features work as expected.

Expected behavior

frcli audit returns something meaningful.

Actual behavior

[frcli] rpc error: code = Unknown desc = ListInvoices failed: invalid preimage length of 0, want 32

To reproduce

  • Send an AMP invoice to yourself using lncli sendpayment --amp
  • run frcli audit

System information

Standalone Faraday, compiled myself from master. Running on Debian 10.9 amd64.

Additional information

I used lncli listinvoices --max_invoices 100000 | jq '.invoices|map(select(.is_amp == true and .r_preimage == null))' to see if my theory is correct and indeed, there are many invoices with both is_amp set and r_preimage being null. Filtering by .is_amp != true and .r_preimage == null and .is_amp == true and .r_preimage != null yields no results.

rkfg avatar Jun 19 '21 12:06 rkfg