Page MenuHomePhabricator

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

Authored by Fabien on Nov 24 2020, 22:00.

Details

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

Event Timeline

Fabien requested review of this revision.Nov 24 2020, 22:00
src/qt/guiutil.cpp
764 ↗(On Diff #26013)

Note to reviewers: not changing check to mask here since it's a bug

deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/protocol.cpp
272 ↗(On Diff #26013)

This service bit is decommissioned, you should remove it altogether instead of tweaking all PRs to have it.

This revision is now accepted and ready to land.Nov 25 2020, 03:36
Fabien edited the test plan for this revision. (Show Details)

Rebase