breez / breez-sdk-greenlight

MIT License
241 stars 42 forks source link

Pending payment is not cleared #1094

Closed andrei-21 closed 3 weeks ago

andrei-21 commented 3 weeks ago

Hi, we have a node 035458b2dd3e2a89213f6ea4cb205463c6d1c3bbbafd30d77ffa1875e957ae1382 which has a pending payment a973bb2d50dc9d6479de9b97f97739bc2081be3faf3218c0d6d688fd03379a1c since February. Interesting that a bit recent payment failed and probably resulted in channel close:

sqlite> select id, payment_type, status, payment_time, datetime(payment_time, 'unixepoch') as date from payments where payment_time >= 1707519064 order by payment_time limit 3;
id                                                                payment_type   status  payment_time  date               
----------------------------------------------------------------  -------------  ------  ------------  -------------------
3e0ee4227bb7370b0865afe6988f9fe7f055c24c50d03f8072f84fe2c4616368  Sent           2       1707519313    2024-02-09 22:55:13
a973bb2d50dc9d6479de9b97f97739bc2081be3faf3218c0d6d688fd03379a1c  Sent           0       1707519464    2024-02-09 22:57:44
fd82c43931f66b9ac172cac9c36453c732ee5a4cbaa3b41ee85e84e6e55c1f8e  ClosedChannel  1       1707665239    2024-02-11 15:27:19

Seems that a clean up logic does not handle this scenario.