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

[Reliable payments] add routing.Route (de)serialization + test #3064

Merged
merged 1 commit into from
May 9, 2019

Conversation

halseth
Copy link
Contributor

@halseth halseth commented May 9, 2019

We will store the routes used during payment attempts, so we need
serialization code.

Split off from #2761

We will store the routes used during payment attempts, so we need
serialization code.
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM ⏱

@Roasbeef Roasbeef merged commit fb1819b into lightningnetwork:master May 9, 2019

func serializeRoute(w io.Writer, r route.Route) error {
if err := WriteElements(w,
r.TotalTimeLock, r.TotalFees, r.TotalAmount, r.SourcePubKey[:],
Copy link
Collaborator

Choose a reason for hiding this comment

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

TotalFees is redundant info and can be derived by TotalAmount-r.Hops[len(r.Hops)-1].AmtToForward

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants