-
Notifications
You must be signed in to change notification settings - Fork 2.2k
rpc: add node color to NodeUpdate and GetInfo #2312
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
routing/notifications.go
Outdated
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.
Not sure if this is needed here, really. If you want to inspect the color you can use the GetNodeInfo RPC.
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.
This is needed to implement #2255
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.
Good point! Ideally, the encode method would be shared, and not duplicated across the two packages though...
halseth
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.
Ideally, independent changes for different packages should be in separate commits. In this case I would suggest lnrpc, server+server_test, rpcserver and finally lncli commits, in that order.
server.go
Outdated
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.
with this addition, the server_test.go should be expended to test this!
|
@halseth I made it with a separate commit per package as you suggested and also added a test. Something I am not convinced though is exposing the utility method EncodeHexColor from the routing package but I wasn't sure where to put it. Seems weird to me, I am open to changes. |
halseth
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.
Yeah, not obvious where to put it, but I think routing is alright for now. LGTM 👍
|
Rebased |
halseth
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.
Needs a rebase and proto regen
|
@halseth rebased with latest master + proto files regenerated |
|
@xsb looks like we have another conflict 😶 |
|
@halseth @cfromknecht Rebased again. Note: While regenerating the proto files I got a different result for |
cfromknecht
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.
|
Yet another proto conflict 🤕
If you still see this after rebasing on master, check your proto+tools version. I just tried rebasing this on master, and regenerating the protos doesn't create any changes to that file for me. |
|
@halseth rebased again. No issue regenerating protos this time (tried on master and on my branch). |
|
sorry @xsb, there was a conflict w/ #3082 :/ you'll need to rebase on master and ensure that your protogen version is on 0.1.3 (step 2 of https://github.com/lightningnetwork/lnd/tree/master/lnrpc#generate-protobuf-definitions) Feel free to ping me when you're ready, hoping to minimize the number of rebases on your end 😬 |
|
@cfromknecht rebased again after upgrading to new protobuf version |
This adds the node color to both
NodeUpdate(as part of aGraphTopologyUpdate) and toGetInforesponse. Tested with a Go gRPC client.Fixes #2255 and #2268