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: expose linked htlcs in ListChannels #4693

Merged
merged 2 commits into from
Oct 29, 2020

Conversation

joostjager
Copy link
Collaborator

Fixes #4687

Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

Just nits ✨

lnrpc/rpc.proto Outdated Show resolved Hide resolved
htlcswitch/circuit_map.go Show resolved Hide resolved
Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

On second look, itests are panicing.

rpcserver.go Outdated Show resolved Hide resolved
@joostjager joostjager requested review from carlaKC and removed request for carlaKC October 15, 2020 14:14
@joostjager joostjager force-pushed the listchannels-circuits branch 2 times, most recently from 952c623 to ea16465 Compare October 15, 2020 15:37
Copy link
Collaborator

@carlaKC carlaKC left a comment

Choose a reason for hiding this comment

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

LGTM, going to be very useful to have this info surfaced!

},
)

// If the incoming channel id is the special hop.Source
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/hop.Source/hop. Source

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hop.Source is a symbol :)

// For an incoming htlc, it is the outgoing channel. When the htlc
// originates from this node or this node is the final destination,
// forwarding_channel will be zero.
uint64 forwarding_channel = 6;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: since we can have a nil outgoing circuit, is it possible that we have a forwarded htlc that will have a 0 forwarding channel (temporarily)? Not the most familiar with that part of the switch, if possible perhaps update the comment so that people don't rely on 0 value meaning own payment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment added. I considered making this state explicit, but I don't think it is necessary. Htlcs that need to be forwarded, but haven't even reached the circuit map will also be reported with a zero forwarding_channel.

@Roasbeef Roasbeef requested review from bhandras and removed request for cfromknecht and Roasbeef October 20, 2020 23:33
Copy link
Collaborator

@bhandras bhandras 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
Copy link
Collaborator Author

Anything blocking merge on this one?

@carlaKC
Copy link
Collaborator

carlaKC commented Oct 28, 2020

Anything blocking merge on this one?

No, forgot you don't have merge powers anymore tbh :)

Travis looks confused over the "sample configuration check" - happened to me on a PR that was opened before it was added. Restarting the actions now, then will merge if that does the trick, otherwise you may need to push again to jump it.

@carlaKC
Copy link
Collaborator

carlaKC commented Oct 28, 2020

@joostjager won't you push again? Looks like sample config check is stuck.

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 😎

@cfromknecht cfromknecht merged commit 4adb812 into lightningnetwork:master Oct 29, 2020
@Roasbeef Roasbeef added this to the 0.12.0 milestone Dec 19, 2020
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.

Feature Request: Show forwarding info in ListChannels
5 participants