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

lnrpc+routerrpc+lncli: add msat fields #3706

Merged
merged 2 commits into from
Nov 14, 2019

Conversation

joostjager
Copy link
Contributor

@joostjager joostjager commented Nov 11, 2019

Lightning supports payments at the msat granularity, but lnd does not expose this on the rpc interface. This PR adds msat fields for payment amounts and fee limits.

Fixes #3689

NOTE: This renames some of the existing rpc fields which is a breaking change for users building against our proto files. The change doesn't change anything on the wire level.

@joostjager joostjager added rpc Related to the RPC interface routing payments Related to invoices/payments v0.9.0 labels Nov 11, 2019
@joostjager joostjager added this to the 0.9.0 milestone Nov 11, 2019
@joostjager joostjager self-assigned this Nov 11, 2019
@joostjager joostjager force-pushed the pay-msat branch 2 times, most recently from 734cf41 to 79d46bb Compare November 11, 2019 18:42
lnrpc/rpc.proto Outdated Show resolved Hide resolved
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Nice to see more consistency in the API!
If we introduce a braking change in the API anyway, wouldn't this be the moment to also just get rid of the sat amounts and only deal with msat? Or at least deprecate them and remove in the next release?

lnrpc/marshall_utils.go Show resolved Hide resolved
lnrpc/marshall_utils.go Show resolved Hide resolved
lnrpc/rpc.proto Outdated Show resolved Hide resolved
rpcserver.go Outdated Show resolved Hide resolved
@joostjager
Copy link
Contributor Author

If we introduce a braking change in the API anyway, wouldn't this be the moment to also just get rid of the sat amounts and only deal with msat?

Get rid of it is also a breaking change on the wire level. So that needs to be preceded with deprecation first.

Outstanding question on that above

@joostjager joostjager force-pushed the pay-msat branch 2 times, most recently from 23be804 to c980d8a Compare November 13, 2019 09:32
@joostjager
Copy link
Contributor Author

Left existing field unchanged, to prevent cascading changes in projects that depend on it.

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@joostjager joostjager merged commit e8b306b into lightningnetwork:master Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payments Related to invoices/payments routing rpc Related to the RPC interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QueryRoutes API - amt ->amt_msat changing ?
3 participants