-
Notifications
You must be signed in to change notification settings - Fork 23
Add ConnectPeer API endpoint #107
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Thanks for assigning @benthecarman as a reviewer! |
b2958d7 to
95aab15
Compare
|
See #103 |
benthecarman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add to the cli as well?
Adds a new endpoint to connect to a peer on the Lightning Network without opening a channel. This is useful for establishing connections before channel operations or for maintaining peer connectivity. The endpoint accepts node_pubkey, address, and an optional persist flag that defaults to true for automatic reconnection on restart. Also adds client library and CLI support for the new endpoint. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
95aab15 to
ff1c271
Compare
|
CLI added. But I see this may be a duplicate indeed. |
| let address = SocketAddress::from_str(&request.address) | ||
| .map_err(|_| ldk_node::NodeError::InvalidSocketAddress)?; | ||
|
|
||
| let persist = request.persist.unwrap_or(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why default to true here? I feel like false would make more sense
Adds a new endpoint to connect to a peer on the Lightning Network without opening a channel. This is useful for establishing connections before channel operations or for maintaining peer connectivity.
The endpoint accepts node_pubkey, address, and an optional persist flag that defaults to true for automatic reconnection on restart.
Needed this endpoint when working on #108. Nodes sometimes seems very slow to auto-reconnect, or not reconnect at all?