Skip to content

renepay: test channel capacity unavailable - #7307

Merged
endothermicdev merged 4 commits into
ElementsProject:masterfrom
Lagrang3:renepay_test_capacity_unavailable
May 20, 2024
Merged

renepay: test channel capacity unavailable#7307
endothermicdev merged 4 commits into
ElementsProject:masterfrom
Lagrang3:renepay_test_capacity_unavailable

Conversation

@Lagrang3

Copy link
Copy Markdown
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
Comment thread plugins/renepay/routetracker.c Outdated
// 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
Copy Markdown
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
Copy Markdown
Collaborator

Looks good apart from unused code in the second commit.

Lagrang3 added 3 commits May 20, 2024 14:05
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
Copy Markdown
Collaborator

Rebased on the updated mocks and removed the unused debugging.

@endothermicdev

Copy link
Copy Markdown
Collaborator

ACK 879320f

@endothermicdev
endothermicdev merged commit abfcc9b into ElementsProject:master May 20, 2024
@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.

2 participants