Skip to content

Retry payment for local failures #4161

@joostjager

Description

@joostjager

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions