-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improve listpeers handling diagnostics #215
Conversation
0404033
to
009f597
Compare
009f597
to
42ee9bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this is due some channels
that are null?
otherwise LGTM
os << "(ConstructedListpeer): {" | ||
<< "connected: " << o.connected | ||
<< ", channels: "; | ||
Util::stream_elements(os, o.channels); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listpeers
should not have the channels anymore, so we may want drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a ConstructedListpeer
which is a "compatibility struct" invented by me to make the conversion easier. Basically I convert the return from listpeerchannels
into what the old listpeers
output used to look like, so the consumers do not need to invert their loops and logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering if this is due some channels that are null?
I think so too, specifically I'm guessing that they have channels which don't have status
fields. The code look for status
w/o checking to see if the field exists.
Based on prior experience these poorly formed channels might exist early in their lifecycle, before they are confirmed.
I expected to see the errors during initial channel creation and didn't in my most recent run, so there is some chance I don't understand the mechanism completetly though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh these are good point, but the status should always exist otherwise there is a bug in cln, I will try to look inside the codebase in this week
Hopefully this pattern will prove useful in future debugging improvements.
42ee9bc
to
823f44c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR addresses (but does not fix) #214
We don't have enough information about the nature of the unexpected handling error: