rpc: Human readable network services #16787
This is a reopen of #15511 (comment) since there have been concept ACKs from sdaftuar and Sjors.
This adds a new entry to
Here is a truncated output of
And one of
The text was updated successfully, but these errors were encountered:
Concept ACK, though to avoid clients having to do additional string parsing, i'd slightly prefer a list instead of one
or leave out the
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
66740f4 doc: add a release note for the new field in 'getpeerinfo' and 'getnetworkinfo' (darosior) 6564f58 rpc/net: decode the services flags in a new entry (darosior) Pull request description: This is a reopen of #15511 (comment) since there have been concept ACKs from sdaftuar and Sjors. This adds a new entry to `getpeerinfo` and `getnetworkinfo` which decodes the network services flags. Here is a truncated output of `getpeerinfo`: ``` "services": "000000000000040d", "servicesnames": "NODE_NETWORK | NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED", "relaytxes": true, ``` And one of `getnetworkinfo`: ``` "localservices": "0000000000000409", "localservicesnames": "NODE_NETWORK | NODE_WITNESS | NODE_NETWORK_LIMITED", "localrelay": true, ``` Fixes #16780. ACKs for top commit: MarcoFalke: unsigned ACK 66740f4 laanwj: ACK 66740f4 Tree-SHA512: 0acc37134b283f56004a41243903d7790cb01591ddf0342489bd05f3a2c780563075373ba5fd55180fa15632e8968ffa11a979b8afece75a6a2e891342601440
…tworkinfo` 1d524c6 tests: rename 'test_getnetworkinginfo' in 'test_getnetworkinfo' (darosior) 07a8f65 tests: add a test for the 'servicesnames' RPC field (darosior) Pull request description: As per #16787 (comment), fixes #16844. This adds a test for both commands in the first commit and renames the test for `getnetworkinfo` in the second commit. ACKs for top commit: laanwj: ACK 1d524c6 Tree-SHA512: 8267dce4d54356debab75014e6f9ba885b892da605ed32f26a5446c232992fcae761861bb678adbdb942815d4706f3768c70deee6afec68f219b23605475be01
* Update travis.yml according to travis backend errors and warns Namely: - root: deprecated key sudo (The key `sudo` has no effect anymore.) - language: value minimal is an alias for shell, using shell - root: key matrix is an alias for jobs, using jobs * Reduce time threshold to force travis to save cache and abort * Add getchaintxstats RPC this is a port of core #9733 * [RPC] Add an uptime command that displays the amount of time that bitcoind has been running this is a port of Core #10400 * rpc/net: decode the services flags in a new entry This is a backport of bitcoin/bitcoin/pull/16787 Co-authored-by: Pieter Wuille <email@example.com> Co-authored-by: Ricardo Velhote <firstname.lastname@example.org> Co-authored-by: Darosior <email@example.com>
Summary: This adds human readable network services to the output of `getpeerinfo` and `getnetworkinfo` Backport of Core [[bitcoin/bitcoin#16787 | PR16787]] Test Plan: Run `src/bitcoin-cli getnetworkinfo` and check the `localservicesnames` field. More tests coming in PR16850 Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D7948