Cut 0.2.5.0 - #185
Merged
Merged
Conversation
ChannelManagerConstructor hardcodes DefaultMessageRouter for onion message path finding, with no way to customize it. Nodes that restrict outbound connections cannot act on Event::ConnectionNeeded, so onion messages (e.g. BOLT 12 invoice requests) to unconnected destinations buffer forever. Such deployments route onion messages through a trusted forwarding peer by prefixing the path with a connected node, which requires substituting the MessageRouter handed to the OnionMessenger and ChannelManager. Add a MessageRouterWrapper hook mirroring the existing RouterWrapper pattern: a nullable constructor parameter whose find_path and create_blinded_paths receive the DefaultMessageRouter the constructor would otherwise have used, so implementations can delegate any case they don't want to customize. To avoid changing the public API, the new parameter is added on new constructor overloads rather than on the existing constructors, which are retained verbatim and simply delegate with a null wrapper, preserving existing behavior exactly. Amp-Thread-ID: https://ampcode.com/threads/T-019fac05-3d6f-75ca-9581-2c17d12954db Co-authored-by: Amp <amp@ampcode.com> Further Tweaks By: Claude Opus 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Determinism check (modulo C#) passed at https://github.com/TheBlueMatt/ldk-garbagecollected/actions/runs/33524745293