Page MenuHomePhabricator

Expose integral m_conn_type in CNodeStats, remove m_conn_type_string
ClosedPublic

Authored by PiRK on Mar 10 2023, 12:13.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable