getAlby / lndhub.go

Accounting wrapper for the Lightning Network. It provides separate accounts for end-users. (LndHub compatible API written in Go)
GNU General Public License v3.0
86 stars 23 forks source link

Refactor reconciliation #447

Closed kiwiidb closed 1 year ago

kiwiidb commented 1 year ago

Partial fix for #445 (still need deployment) Since there still seem to be payments that are not being credited after a HODL invoice is settled, we must deploy a cron job to periodically check the pending payments in the database and track their status with LND. Because we run this in a job and we want to avoid recent HODL payments, we only check the status of invoices older than 24h (and younger than 2 weeks). We also use a timeout to be sure this job doesn't keep on running.

The cmd/payment-reconciliation folder is already being built and added as a binary to the docker container. So to run this as a cron job, we just have to overwrite the containers default command.