HomePhabricator

Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr…

Description

Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function

Summary:

Side effect: this results in the RPC showing unknown service bits as
"UNKNOWN[n]" like the GUI.

Note that there is no common mask-to-vector<string> function because
both GUI and RPC would need to iterate through it to convert to their
desired target formats.

Backport of core PR18165.

Depends on D8516.

Test Plan:

ninja all check-all

./src/qt/bitcoin-qt -server

Check the service bits are displayed correctly in the peers window

./src/bitcoin-cli getnetworkinfo

Check the service bits are displayed correctly

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8518

Details

Provenance
Luke Dashjr <luke-jr+git@utopios.org>Authored on Feb 17 2020, 01:53
FabienCommitted on Nov 25 2020, 16:42
FabienPushed on Nov 25 2020, 16:44
Reviewer
Restricted Project
Differential Revision
D8518: Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function
Parents
rABC4a70e0886aef: GUI: Refactor formatServicesStr to warn when a ServicesFlag is missing
Branches
Unknown
Tags
Unknown

Event Timeline