-
Notifications
You must be signed in to change notification settings - Fork 886
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
listpeers: add num_channels #5968
listpeers: add num_channels #5968
Conversation
This will save a lot of RPC ping/pong when plugins still need to iterate both, `listpeers` and `listpeerchannels`. When `num_channels` is 0 they can skip additional calls. Changelog-Added: RPC `listpeers` output now has `num_channels`.
Q: Is there a helper to count a list instead of |
1d51711
to
c5f1780
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.
Yes, this is a good idea.
Ack 1d51711
There was just a typo in the schema that I force pushed right now... |
@rustyrussell Can we have this in 23, because otherwise I need ugly if/else code everywhere in the plugins when it comes to |
c5f1780
to
655e8d1
Compare
655e8d1
to
bc99d0a
Compare
74cf899
to
99d9629
Compare
99d9629
to
b8d78ab
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.
ACK b007076
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.
Minor.issue with field renumbering, otherwise good 👍
51d56c4
to
461a5fa
Compare
461a5fa
to
2bdc819
Compare
Ack 2bdc819 |
ACK 2bdc819 |
This will be helpful for plugins and because of the
listpeerchannels
listpeers
split, so that we can reduce unnecessary RPC ping/pong calls whennum_channels
is 0.A lot of plugins still need to iterate both calls, so then they can save some IO load and delays.