rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Multiple `InvoiceReceived` events for single `pay_for_offer` call

Open benthecarman opened this issue 7 months ago • 4 comments

I had a simple unit test that would spin up 2 nodes and pay a bolt12 offer between them. My InvoiceReceived event handler was not idempotent and would throw if duplicates came in, this caused me to notice that I was receiving multiples of the same event. Found this when upgrading from 0.0.125 to 0.1.1. Can provide logs and code if more info is needed.

Edit: it seems send_payment_for_bolt12_invoice is not idempotent either so this would effect everyone using manually_handle_bolt12_invoices

benthecarman avatar Mar 07 '25 06:03 benthecarman