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

renepay: test channel capacity unavailable #7307

Conversation

Lagrang3
Copy link
Collaborator

Add a test that checks get_route and uncertainty_update behavior's handling of missing channel capacities.

As pointed out in PR #7194: renepay couldn't handle a failed call to gossmap_chan_get_capacity leading to

2024-04-02T15:27:49.4484027Z lightningd-1 2024-04-02T15:21:59.115Z **BROKEN** plugin-cln-renepay: uncertainty_network_update (line 175) unable to fetch channel capacity

in rare cases.

After #7125 this issue was fixed, this PR adds a unit test to confirm that.
Therefore #7194 can be closed.

@Lagrang3 Lagrang3 force-pushed the renepay_test_capacity_unavailable branch from f9a9eb3 to 4f71c76 Compare May 14, 2024 07:04
@Lagrang3 Lagrang3 mentioned this pull request May 18, 2024
// plugin_log(pay_plugin->plugin, LOG_DBG, "tracking %zu routes",
// route_map_count(pay_plugin->route_map));
// plugin_log(pay_plugin->plugin, LOG_DBG, "%s",
// fmt_route_map(tmpctx, pay_plugin->route_map));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra commented code here and below

@endothermicdev
Copy link
Collaborator

Looks good apart from unused code in the second commit.

Add a test that checks `get_route` and `uncertainty_update` behaviour's
handling of missing channel capacities.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Keep a double-entry record of pending routes so that we can flag them as
not memory leaks.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Delete temporary gossmap files after unit tests completion.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@endothermicdev endothermicdev force-pushed the renepay_test_capacity_unavailable branch from 371c6bc to 879320f Compare May 20, 2024 21:00
@endothermicdev
Copy link
Collaborator

Rebased on the updated mocks and removed the unused debugging.

@endothermicdev
Copy link
Collaborator

ACK 879320f

@endothermicdev endothermicdev merged commit abfcc9b into ElementsProject:master May 20, 2024
35 checks passed
@Lagrang3 Lagrang3 deleted the renepay_test_capacity_unavailable branch May 21, 2024 04:58
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.

None yet

2 participants