libplugin-pay: use map for channel hints (on top of #7494)
Description
This commit fixes a "FIXME: This is slow" in the pay plugin. For nodes with many channels this is a tremendous improvement in pay performance. PR https://github.com/ElementsProject/lightning/pull/7611 improves payment performance from 15 seconds to 13.5 seconds on one of our nodes. This commit improves payment performance from 13.5 seconds to 5.7 seconds.
Changes Made
[ ] Feature: Brief description of the new feature or functionality added.
[ ] Bug Fix: Brief description of the bug fixed and how it was resolved.
[x] Refactor: Any code improvements or refactoring done without changing the functionality.
Checklist
Ensure the following tasks are completed before submitting the PR:
[x] Changelog has been added in relevant commit/s.
[x] Tests have been added or updated to cover the changes.
[x] Documentation has been updated as needed.
[x] Any relevant comments or TODOs have been addressed or removed.
Additional Notes
This PR builds on top of #7494
This is a replacement of #7636, because that PR conflicts with #7494
libplugin-pay: use map for channel hints (on top of #7494)
Description
This commit fixes a "FIXME: This is slow" in the pay plugin. For nodes with many channels this is a tremendous improvement in pay performance. PR https://github.com/ElementsProject/lightning/pull/7611 improves payment performance from 15 seconds to 13.5 seconds on one of our nodes. This commit improves payment performance from 13.5 seconds to 5.7 seconds.
Changes Made
Checklist
Ensure the following tasks are completed before submitting the PR:
TODOs
have been addressed or removed.Additional Notes
This PR builds on top of #7494 This is a replacement of #7636, because that PR conflicts with #7494