Skip to content

Conversation

@Lagrang3
Copy link
Collaborator

This could be useful if we want to create one-time use layers on the flight and not worry about memory leaks (one time used layers that are not removed constitute a memory leak in a sense).

I would like to re-introduce in the pay command (xpay-handle-pay=true) the possibility of excluding channels
and nodes using the legacy pay style exclude parameter.
One possible solution is to create a one-time layer with all the channels and nodes listed in the exclude
array as disabled and then pass the call to xpay with that temporary layer in the parameters.
We make this one-time layer possible by introducing expiration times to layers in this PR.

Changelog-Added: askrene: add an optional self-destruction timer (expiration parameter) to new layers.

@Lagrang3 Lagrang3 force-pushed the askrene-self-destructing-layers branch from ca32c5f to b021d3d Compare December 20, 2024 20:00
This could be useful if we want to create one-time use layers
on the flight and not worry about memory leaks (one time used
layers that are not removed constitute a memory leak in a sense).

Changelog-Added: askrene: add an optional self-destruction timer (expiration parameter) to new layers.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3 Lagrang3 force-pushed the askrene-self-destructing-layers branch from b021d3d to 2c2a4e6 Compare December 23, 2024 08:59
@Lagrang3 Lagrang3 mentioned this pull request Feb 4, 2025
@Lagrang3 Lagrang3 added this to the v25.02 milestone Feb 6, 2025
@Lagrang3 Lagrang3 requested a review from rustyrussell February 6, 2025 08:03
@rustyrussell
Copy link
Contributor

I'm hoping that we don't have leaks, and don't have to resort to this!

@rustyrussell rustyrussell removed this from the v25.02 milestone Feb 12, 2025
@Lagrang3
Copy link
Collaborator Author

I am closing this. I guess the same plugin that creates the layer can destroy it himself.
Either with a timer or a destructor.

@Lagrang3 Lagrang3 closed this May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants