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

Display `close_to` address in `listpeers` #3223

Merged

Conversation

@niftynei
Copy link
Collaborator

niftynei commented Oct 29, 2019

Make close-to address more visible by printing in listpeers channels.

@niftynei niftynei requested a review from cdecker as a code owner Oct 29, 2019
Copy link
Contributor

rustyrussell left a comment

Ack 9325204

But needs rebase to remove CHANGELOG patch.


### Fixed


This comment has been minimized.

Copy link
@rustyrussell

rustyrussell Nov 8, 2019

Contributor

Needs rebase to use Changelog-Added: instead.

json_add_string(response, "close_to_addr",
encode_scriptpubkey_to_addr(tmpctx,
get_chainparams(ld),
channel->shutdown_scriptpubkey[LOCAL]));

This comment has been minimized.

Copy link
@rustyrussell

rustyrussell Nov 8, 2019

Contributor

Should we handle encode_scriptpubkey_to_addr returning NULL? The classic would be not to add the field if it's NULL...

This comment has been minimized.

Copy link
@niftynei

niftynei Nov 13, 2019

Author Collaborator

good idea. updated.

@rustyrussell rustyrussell added this to the 0.7.4 milestone Nov 11, 2019
niftynei added 3 commits Oct 29, 2019
Previously, returned null if a scriptpubkey was not Segwit; now
handles encoding to Base58 for other types.
If a 'upfront_shutdown_script' was specified, show the address +
scriptpubky in `listpeers`

Changelog-added: JSON API: `listpeers` channels now include `close_to` and `close_to_addr` iff a `close_to` address was specified at channel open
@niftynei niftynei force-pushed the niftynei:nifty/upfront_to_listpeers branch from 9325204 to 87ff75a Nov 13, 2019
@niftynei niftynei removed the needs-rebase label Nov 13, 2019
Copy link
Contributor

rustyrussell left a comment

Ack 87ff75a

@rustyrussell rustyrussell merged commit a333df4 into ElementsProject:master Nov 13, 2019
4 checks passed
4 checks passed
bitcoin-bot/acks Acks by rustyrussell
bitcoin-bot/changelog This PR has at least one changelog entry
bitcoin-bot/fixups PR does not contain unsquashed fixups
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
Projects
None yet
2 participants
You can’t perform that action at this time.