boltz-backend
boltz-backend copied to clipboard
HTLCs are held too long with prepayminerfee
In a reverse swap with prepayminerfee
set, two invoices are created, for the payment and for the mining fee.
It is very common that one of the payments finds a route (in general the smaller one, for the mining fee), but the other one fails. If that happens, the HTLCs of the failing payment are failed quickly, but the HTLCs of the other payment are held for a very long time, until the invoice times out (24 hours, I guess).
The HTLCs of both invoices should be considered as the same payment, and the behaviour should be similar to MPP. If the server does not receive all HTLCs within a reasonable time (similar to the timeout of a MPP), then it should fail the HTLCs it has received so far, and it should also fail those that are received after the timeout.