Skip to content
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

tchrpc: change FundChannel endpoint to POST #1220

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

GeorgeTsagk
Copy link
Member

Closes #1219

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12049818174

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 9 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 40.864%

Files with Coverage Reduction New Missed Lines %
asset/asset.go 2 81.13%
tapchannel/aux_leaf_signer.go 3 36.31%
tapgarden/caretaker.go 4 68.5%
Totals Coverage Status
Change from base Build 12038519798: 0.02%
Covered Lines: 25724
Relevant Lines: 62950

💛 - Coveralls

@V0nMis3s

This comment was marked as resolved.

@GeorgeTsagk
Copy link
Member Author

Hey @V0nMis3s, thanks for taking a look at the PR

Instead of directly modifying the .pb.gw.go file, the appropriate place to make these changes is in the .proto file (taprpc/tapchannelrpc/tapchannel.proto). Specifically:

This was actually automated and was generated by running make rpc (check the Makefile section). The only change that had to be made was in the tapchannel.yaml file, which we use to map the rpc methods to rest endpoints

@V0nMis3s
Copy link

V0nMis3s commented Nov 27, 2024

Hey @GeorgeTsagk, thank you for the explanation! I assumed the mapping was automatically handled by the default rules of grpc-gateway, and I didn’t realize the tapchannel.yaml file was being used to map the RPC methods to REST endpoints. Thanks for pointing that out!

Copy link
Contributor

@gijswijs gijswijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@GeorgeTsagk GeorgeTsagk added this pull request to the merge queue Nov 27, 2024
Merged via the queue into lightninglabs:main with commit 098f09f Nov 27, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[bug]: REST FundChannel Method Incorrectly Implemented as GET Instead of POST and Does Not Work
5 participants