routerrpc: add outgoing_chan_ids to EstimateRouteFee#10501
routerrpc: add outgoing_chan_ids to EstimateRouteFee#10501asheswook wants to merge 3 commits intolightningnetwork:masterfrom
Conversation
Summary of ChangesHello @asheswook, 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 introduces a new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Code Review
This pull request adds the outgoing_chan_ids field to the EstimateRouteFee RPC, which is a useful addition. The implementation looks correct. However, I have a couple of suggestions. First, for consistency within cmd/commands/cmd_payments.go, the new outgoing_chan_id flag should be a StringSliceFlag and parsed with the existing parseChanIDs helper, similar to other commands. Second, while you've mentioned that core logic is tested, this new functionality should have its own integration test to ensure the outgoing_chan_ids parameter is correctly handled from the CLI/RPC down to the routing logic. Please consider adding a test case to itest/lnd_estimate_route_fee_test.go. The lack of tests for new functionality is a high-severity issue.
There was a problem hiding this comment.
Code Review
This pull request adds the outgoing_chan_ids field to the EstimateRouteFee RPC, allowing users to specify which outgoing channels to use for fee estimation. The changes look good and include updates to the command-line interface, RPC server, and integration tests. I've made a few suggestions to improve code style and correctness.
|
Thanks for the addition. I think this is useful for calls of Can you resolve the conflicts please. |
8a7d124 to
bd79b0f
Compare
@hieblmi I regenerated protobuf file (router.pb.go) and I pushed it. |
hieblmi
left a comment
There was a problem hiding this comment.
Hi, I have suggestions for some more improvements. Looks almost good to go.
| probing: false, | ||
| destination: mts.bob, | ||
| outgoingChanIds: []uint64{999999999}, | ||
| expectedError: "insufficient local balance", |
There was a problem hiding this comment.
lets use a name here like in the other tests, e.g.
failureInsufficientBalance = lnrpc.PaymentFailureReason_FAILURE_REASON_INSUFFICIENT_BALANCE //nolint:ll
There was a problem hiding this comment.
expectedError field is string type, not a FailureReason type. If the path is not found, I think maybe the approach of FailureReason is valid, but if there is no balance, it is correct to treat it as an error.
Instead, as your review, it's better to define the error string value without using it directly like this:
const (
ErrInsufficientBalance = "insufficient local balance"
)
|
@hieblmi Sorry for late. Can you re-review this PR please? |
|
@hieblmi: review reminder |
Change Description
I needed the OutgoingChanIds field in EstateRouteFee. Fortunately, I was able to change it with a few modifications without core logic changes.
Steps to Test
I didn't write a separate test because this change doesn't change the test coverage of the core route logic.I checked that the test for the EstimateRouteFee command already exists.
So I added integration tests for
outgoing_chan_idsinEstimateRouteFee.make itest icase=estimate_route_feePull Request Checklist
Testing
Code Style and Documentation
[skip ci]in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.