-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[g175] refactor: prep for multiple Node versions #10279
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: 0-21-0-staging
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ellemouton, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request is a refactor and cleanup aimed at preparing the codebase for supporting multiple versions of Lightning Network node announcements. It introduces a Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a refactor to prepare the codebase for handling multiple Node versions, specifically by adding a Version
field to the models.Node
struct and using a constructor to create Node
instances. The changes primarily involve modifying the autopilot/prefattach_test.go
, channeldb/db_test.go
, discovery/chan_series.go
, graph/builder.go
, graph/builder_test.go
, graph/db/graph.go
, graph/db/graph_test.go
, graph/db/interfaces.go
, graph/db/kv_store.go
, graph/db/models/channel_auth_proof.go
, graph/db/models/channel_edge_info.go
, graph/db/models/node.go
, graph/db/notifications.go
, graph/db/sql_migration.go
, graph/db/sql_migration_test.go
, lnrpc/devrpc/dev_server.go
, routing/pathfind_test.go
, routing/payment_session_source.go
, routing/payment_session_test.go
, routing/router_test.go
, and server.go
files. The review focuses on correctness, maintainability, and adherence to the repository's style guide, particularly concerning code documentation, commenting, spacing, and formatting.
496c5e3
to
8eb29f1
Compare
Simplify the struct by removing un-used methods and outdated comments.
Remove the 2 sources of truth here. If we have a signature for the node, then we have the announcement.
Add a version field to models.Node and a V1 constructor for it.
Remove various unused fields and methods.
A simple refactor & clean-up PR.
The main thing here is an added Version field to the
models.Node
struct & using a constructor to create the Node instance so that all the V1 fields are set for a V1 node. This is in preparation for dealing with V2 Nodes.Part of #10293