Skip to content

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
Contributor

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.

3 participants