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

rpc: fix regression in SendToRouteSync payment hash parsing #2601

Merged

Conversation

Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented Feb 7, 2019

A recent change in this area of the codebase refactored some code to
make way for the deprecation of the streaming multi-route SendToRoute
method. Along the way, it removed the parsing of the PaymentHashString
field for the sync SendToRouteSync which is meant to be used via the
REST interface. In this commit, we fix this by populating both
PaymentHash and PaymentHashString. This is OK, as
extractPaymentIntent will check both values to extract the hex-encoded
payment hash if it's specified.

A recent change in this area of the codebase refactored some code to
make way for the deprecation of the streaming multi-route `SendToRoute`
method. Along the way, it removed the parsing of the `PaymentHashString`
field for the sync `SendToRouteSync` which is meant to be used via the
REST interface. In this commit, we fix this by populating _both_
`PaymentHash` and `PaymentHashString`. This is OK, as
`extractPaymentIntent` will check both values to extract the hex-encoded
payment hash if it's specified.
@Roasbeef Roasbeef added P2 should be fixed if one has time bug fix trivial labels Feb 7, 2019
@Roasbeef Roasbeef added this to the 0.6 milestone Feb 7, 2019
@Roasbeef Roasbeef added the rpc Related to the RPC interface label Feb 7, 2019
@joostjager joostjager self-requested a review February 7, 2019 06:53
Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

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

👊LGTM

@halseth
Copy link
Contributor

halseth commented Feb 7, 2019

This is why github should start to show code only-moved 🙄

@joostjager joostjager merged commit e26dc6a into lightningnetwork:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix P2 should be fixed if one has time rpc Related to the RPC interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants