Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: autoclean: cleanup the forwards with localfailed #6109

Conversation

vincenzopalazzo
Copy link
Collaborator

While we are cleaning up the list forwards with the autoclean plugin we are not taking into count the forward's payments with the status set to local_failed. In this case, the forwards have no resolved time because it was not resolved by us due to some local error.

So, this commit is fixing the auto clean plugin by allowing to delete of the forwards with status set to local_failed by taking into count the received_time, with the assumption that the received_time, in this case, is equal to the resolved time (?)

Reported-by: @denis2342
Link: #6058
Signed-off-by: Vincenzo Palazzo vincenzopalazzodev@gmail.com
Changelog-Fixed: plugin: autoclean: considerer the forwards with status set to local_failed.

Fixes #6058

@vincenzopalazzo vincenzopalazzo added this to the v23.05 milestone Mar 21, 2023
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, and great solution! I think we can make this both a bit neater and clearer though...

plugins/autoclean.c Outdated Show resolved Hide resolved
@vincenzopalazzo vincenzopalazzo force-pushed the macros/autoclean_local_failed branch 2 times, most recently from 3a6f655 to 745759c Compare March 22, 2023 08:27
While we are cleaning up the list forwards with the autoclean plugin we are
not taking into count the forward's payments with the status set to
`local_failed`. In this case, the forwards have no resolved
time because it was not resolved by us due to some local error.

So, this commit is fixing the auto clean plugin by allowing to delete
of the forwards with status set to local_failed by taking into count
the received_time, with the assumption that the received_time, in this case,
is equal to the resolved time (?)

Reported-by: @denis2342
Link: ElementsProject#6058
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Changelog-Fixed: plugin: autoclean: considerer the forwards with status
set to `local_failed`.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 4d5300c

@vincenzopalazzo vincenzopalazzo merged commit 3424f70 into ElementsProject:master Mar 23, 2023
@vincenzopalazzo vincenzopalazzo deleted the macros/autoclean_local_failed branch March 23, 2023 08:18
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.

autoclean does not remove local_failed
2 participants