-
Notifications
You must be signed in to change notification settings - Fork 421
Description
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.