-
Notifications
You must be signed in to change notification settings - Fork 91
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
Switch to use NetAddress for peer addresses #85
Conversation
ba818f2
to
29a7c9a
Compare
04032ec
to
38c5707
Compare
38c5707
to
3042d2b
Compare
Rebased on main after #84 landed. |
c1ad3d0
to
3f9d68e
Compare
Rebased after #56 has been merged. |
3f9d68e
to
abfda94
Compare
Rebased on main. |
abfda94
to
8f9229c
Compare
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.
FYI your commits are unsigned.
8f9229c
to
a87508c
Compare
Thanks, they are actually all signed, just to a different user ID. Not exactly sure why Github is showing as unverified, it knows both email addresses... Will need to look into that. |
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.
Feel free to squash.
9780c83
to
67f4811
Compare
Squashed commits and included the following changes: diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl
index d31865a..b767de0 100644
--- a/bindings/ldk_node.udl
+++ b/bindings/ldk_node.udl
@@ -74,5 +74,4 @@ enum NodeError {
"InvoiceCreationFailed",
"PaymentFailed",
- "PeerInfoNotFound",
"ChannelCreationFailed",
"ChannelClosingFailed",
diff --git a/src/error.rs b/src/error.rs
index 7fdd9d6..1d59fc0 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -16,6 +16,4 @@ pub enum Error {
/// An attempted payment has failed.
PaymentFailed,
- /// A given peer info could not be found.
- PeerInfoNotFound,
/// A channel could not be opened.
ChannelCreationFailed,
@@ -71,5 +69,4 @@ impl fmt::Display for Error {
Self::InvoiceCreationFailed => write!(f, "Failed to create invoice."),
Self::PaymentFailed => write!(f, "Failed to send the given payment."),
- Self::PeerInfoNotFound => write!(f, "Failed to resolve the given peer information."),
Self::ChannelCreationFailed => write!(f, "Failed to create channel."),
Self::ChannelClosingFailed => write!(f, "Failed to close channel."),
diff --git a/src/lib.rs b/src/lib.rs
index 0b8e7eb..75e74cf 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1608,5 +1608,8 @@ async fn do_connect_peer(
let socket_addr = addr
.to_socket_addrs()
- .map_err(|_| Error::PeerInfoNotFound)?
+ .map_err(|e| {
+ log_error!(logger, "Failed to resolve network address: {}", e);
+ Error::InvalidNetAddress
+ })?
.next()
.ok_or(Error::ConnectionFailed)?; |
While we're still blocked on upstream changes, we now switch our peer info to use a newtype around `NetAddress` so that we won't have to break serialization compatibility when the upstream changes becom available post-0.1.
67f4811
to
63f3105
Compare
Closing manually as the merge somehow didn't close this. |
Fixes #11,
based on #84.We so far waited for lightningdevkit/rust-lightning#2056 to be resolved. However, as it didn't happen in time for LDK 0.0.115, we now switch our peer info to use a newtype around
NetAddress
so that we won't have to break serialization compatibility when the upstream changes become available post-0.1.