-
Notifications
You must be signed in to change notification settings - Fork 30
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
sim-lib: Adds LightningNode::get_network #120
sim-lib: Adds LightningNode::get_network #120
Conversation
cdaf919
to
58376b4
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.
Approach ACK, just need to deal with the different values from different impls.
58376b4
to
5b46ecc
Compare
Amended comments from review |
5b46ecc
to
6f3ba4a
Compare
6f3ba4a
to
01123bd
Compare
"LND node is not connected any chain".to_string(), | ||
)); | ||
} else if info.chains.len() > 1 { | ||
return Err(LightningError::ValidationError(format!( | ||
"LND node is connected to more than one chain: {:?}", |
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.
Just a note to self to format this with the NodeId
when rebasing for #103.
Addresses comments from @carlaKC |
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.
💯 01123bd
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.
tACK.
I think LND get_network
failing with ValidationErrors
is both odd and very efficient. Like, LND is self validating it's network, but the spec for get_network
only says "tell me your network". Not blocking
Well, there's the issue that they have specific variants that cannot be used to construct |
01123bd
to
4e9cc81
Compare
The current approach to get the network from a node stores the information in `NodeInfo`. However, this is troublesome going forward given we will start using `NodeInfo` to store information about nodes we do not control (and from which we cannot query the network). Furthermore, the network information is worthless once we've sanity-checked that we are running on a network we support and all nodes are running on the same one, so there is no point keeping that around
Updated CLN to return |
4e9cc81
to
def8dd1
Compare
Rebased |
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.
✅ def8dd1
The current approach to get the network from a node stores the information in
NodeInfo
.However, this is troublesome going forward (after #103) given we will start using
NodeInfo
to store information about nodes we do not control (and from which we cannot query the network). Furthermore, the network information is worthless once we've sanity-checked that we are running on a network we support and all nodes are running on the same one, so there is no point keeping that around