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: include `private` field in `channels` output #2230

Merged
merged 1 commit into from Jan 8, 2019

Conversation

Projects
None yet
2 participants
@niftynei
Copy link
Collaborator

niftynei commented Jan 7, 2019

Reveal channel's 'privacy' in listpeers output

Suggested-By: @shesek

@niftynei niftynei requested a review from rustyrussell Jan 7, 2019

@niftynei niftynei requested a review from cdecker as a code owner Jan 7, 2019

@rustyrussell
Copy link
Contributor

rustyrussell left a comment

Minor testing nit only... Should also add a test somewhere for a non-private channel...

@@ -805,6 +805,12 @@ def test_private_channel(node_factory):
assert not l1.daemon.is_in_log('Received node_announcement for node {}'.format(l2.info['id']))
assert not l2.daemon.is_in_log('Received node_announcement for node {}'.format(l1.info['id']))

# test for 'private' flag in rpc output
assert len(l1.rpc.listpeers()) == 1

This comment has been minimized.

@rustyrussell

rustyrussell Jan 8, 2019

Contributor

I don't think this does what you want? This passes because the output only has one field 4, "peers".

The next line checks there's only one entry in the peers array: only_one asserts that

This comment has been minimized.

@niftynei

niftynei Jan 8, 2019

Author Collaborator

Right, this check isnt' really checking anything worthwhile, rm'd.

listpeers: include `private` field in `channels` output
Reveal channel's 'privacy' in `listpeers` output

Suggested-By: @shesek

@niftynei niftynei force-pushed the niftynei:nifty/add_private_flag_to_channel_output branch from 5065646 to 7154738 Jan 8, 2019

@niftynei

This comment has been minimized.

Copy link
Collaborator Author

niftynei commented Jan 8, 2019

Cool. Test for non-private channel's flag is one line down :)

@rustyrussell
Copy link
Contributor

rustyrussell left a comment

Ack 7154738

@rustyrussell rustyrussell merged commit efa3887 into ElementsProject:master Jan 8, 2019

2 checks passed

ackbot PR ack'd by rustyrussell
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment