-
Notifications
You must be signed in to change notification settings - Fork 102
Include non-permanently connected peers in list_peers()
#95
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
Conversation
1bfbfe2
to
7b6ac82
Compare
Rebased after #85 landed. |
7b6ac82
to
a4da746
Compare
Rebased on main. |
(Some(con_addr), Some(_stored_addr)) => NetAddress(con_addr), | ||
(None, Some(stored_addr)) => stored_addr, | ||
(Some(con_addr), None) => NetAddress(con_addr), | ||
(None, None) => continue, |
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.
When would this happen?
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.
As we're using lightning-net-tokio
and don't support OnionV3 currently, it shouldn't happen. In particular the conn_addr_opt
should always be Some
. However, I'd rather skip than unwrap here, as it doesn't hurt and is safer if something ever were to change.
src/types.rs
Outdated
/// The channel's ID (prior to funding transaction generation, this is a random 32 bytes, | ||
/// thereafter this is the transaction ID of the funding transaction XOR the funding transaction | ||
/// output). | ||
/// The channel ID (prior to funding transaction generation, this is a random 32 byte |
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.
s/32 byte/32-byte
/// that if we broadcast a revoked state, our counterparty can punish us by claiming at least | ||
/// this value on chain. | ||
/// The value, in satoshis, of this channel as it appears in the funding output. | ||
pub channel_value_sats: u64, |
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.
We use the plural sats but the singular msat below, it seems.
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.
Mh, true. Possibly we should decide one way and clean up all at once. This is however doesn't feel like the right place to do it?
a4da746
to
efec308
Compare
0dfee49
to
b10591a
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.
LGTM. Please squash fixups.
b10591a
to
f562395
Compare
Squashed without further changes. |
Closes #62,
based on #85This is a follow-up to #56, as we now are able to include non-permanently connected peers in
list_peers()
.We also include a number of minor doc fixes as a second commit.