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
Collaborator

@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

LGTM

@Roasbeef Roasbeef merged commit fb1819b into lightningnetwork:master May 9, 2019
1 of 2 checks passed

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

@joostjager joostjager May 14, 2019

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

Copy link
Collaborator Author

@halseth halseth May 15, 2019

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

Successfully merging this pull request may close these issues.

None yet

3 participants