You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing a payment benchmark in ldk-node #664
, I noticed that it is surprisingly difficult to fully saturate a node with payments. One reason is that payments fail immediately if the local channel cannot handle them at that moment, for example when all HTLC slots are filled. The caller, in this case the benchmark code, must then retry. This requires some form of polling, which can create lock contention and slow down the node. To avoid this, the caller has to ensure that not too many payments are initiated simultaneously, which adds complexity.
This made me wonder why LDK does not use the payment timeout window to wait for the local channel to become available again. Especially when the local failure is temporary, such as hitting the maximum HTLC limit, it seems more reasonable to wait rather than forcing the user to poll aggressively.
IMO we shouldn't - HTLC slots being full is pretty rare, the more common case for this is "there is no balance remaining", which I think obviously we should fail early to give the user indication that we've failed. If HTLC slots are full, its probably because we have some stuck HTLCs, and in that case IMO similar logic applies - sitting around for 2-5 seconds twiddling our thumbs is less useful than failing early to tell the user their payment isn't gonna work.
Activity
TheBlueMatt commentedon Feb 9, 2026
IMO we shouldn't - HTLC slots being full is pretty rare, the more common case for this is "there is no balance remaining", which I think obviously we should fail early to give the user indication that we've failed. If HTLC slots are full, its probably because we have some stuck HTLCs, and in that case IMO similar logic applies - sitting around for 2-5 seconds twiddling our thumbs is less useful than failing early to tell the user their payment isn't gonna work.