On start up since we do not pass the wait index to start at wait_any_invoice returns all the invoices that have been paid on the node. We should try and avoid this. And with the addition of bolt 12 we need to make sure we are not adding to the amount thats been paid more then once per real payment.
On start up since we do not pass the wait index to start at wait_any_invoice returns all the invoices that have been paid on the node. We should try and avoid this. And with the addition of bolt 12 we need to make sure we are not adding to the amount thats been paid more then once per real payment.
https://github.com/cashubtc/cdk/blob/4fdc4f49d2ed8ba74b043c163398538d4ec90352/crates/cdk-cln/src/lib.rs#L101-L118