HomePhabricator

Expose integral m_conn_type in CNodeStats, remove m_conn_type_string

Description

Expose integral m_conn_type in CNodeStats, remove m_conn_type_string

Summary:

Currently, strings are stored for what are actually integral (strong) enum types. This is fine, because the strings are only used as-is for the debug log and RPC. However, it complicates using them in the GUI. User facing strings in the GUI should be translated and only string literals can be picked up for translation, not runtime std::strings.

Fix that by removing the std::string members and replace them by strong enum integral types.

This is a backport of core#20786

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Jon Atack <jon@atack.com>Authored on Jan 2 2021, 09:44
PiRKCommitted on Mar 10 2023, 14:41
PiRKPushed on Mar 10 2023, 14:41
Reviewer
Restricted Project
Differential Revision
D13269: Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
Parents
rABC3a2576f9387f: net: Remove unused cs_feeFilter
Branches
Unknown
Tags
Unknown