Commit fc9342b
authored
web(topology): config-driven coin label fallback for chains absent from Blockchain enum (#420)
The dashboard topology/node_info/primary_chain_key surfaces derive the
node coin symbol by switch over the consensus Blockchain enum, which has
no entry for BCH or the NMC-aux sub-state. Such a node was labelled with
an empty symbol/network/chain-key -- the dashboard going blank rather
than truthful, against the per-node-topology charter.
Add a web-layer m_coin_label captured from the raw --blockchain/cfg
string and wired via set_coin_label(). node_symbol() and
primary_chain_key() fall back to it (upper/lower-cased) only when the
enum has no entry, so every node labels its own chain truthfully without
touching the consensus enum (which address_validator / payout_manager
switch on -- an enum add there ripples into consensus/address logic).
Enum-supported coins are unchanged. Empty label still yields "" so
callers surface an honest "chain not enabled" instead of a fabricated
identity. Web layer only; never feeds consensus or address validation.
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>1 parent b0c4ce6 commit fc9342b
3 files changed
Lines changed: 51 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
581 | 582 | | |
582 | 583 | | |
583 | 584 | | |
| |||
765 | 766 | | |
766 | 767 | | |
767 | 768 | | |
768 | | - | |
| 769 | + | |
| 770 | + | |
769 | 771 | | |
770 | 772 | | |
771 | 773 | | |
| |||
1142 | 1144 | | |
1143 | 1145 | | |
1144 | 1146 | | |
1145 | | - | |
1146 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1147 | 1151 | | |
1148 | 1152 | | |
1149 | 1153 | | |
| |||
1568 | 1572 | | |
1569 | 1573 | | |
1570 | 1574 | | |
| 1575 | + | |
1571 | 1576 | | |
1572 | 1577 | | |
1573 | 1578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5210 | 5210 | | |
5211 | 5211 | | |
5212 | 5212 | | |
5213 | | - | |
5214 | | - | |
5215 | | - | |
5216 | | - | |
5217 | | - | |
5218 | | - | |
5219 | | - | |
5220 | | - | |
5221 | | - | |
5222 | | - | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
5223 | 5217 | | |
5224 | 5218 | | |
5225 | 5219 | | |
| |||
5295 | 5289 | | |
5296 | 5290 | | |
5297 | 5291 | | |
| 5292 | + | |
| 5293 | + | |
| 5294 | + | |
| 5295 | + | |
| 5296 | + | |
| 5297 | + | |
| 5298 | + | |
| 5299 | + | |
| 5300 | + | |
| 5301 | + | |
| 5302 | + | |
5298 | 5303 | | |
5299 | 5304 | | |
5300 | 5305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
937 | 938 | | |
938 | 939 | | |
939 | 940 | | |
| |||
1199 | 1200 | | |
1200 | 1201 | | |
1201 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1202 | 1220 | | |
1203 | 1221 | | |
1204 | 1222 | | |
| |||
1211 | 1229 | | |
1212 | 1230 | | |
1213 | 1231 | | |
1214 | | - | |
| 1232 | + | |
1215 | 1233 | | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1216 | 1237 | | |
1217 | 1238 | | |
1218 | 1239 | | |
| |||
1296 | 1317 | | |
1297 | 1318 | | |
1298 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1299 | 1326 | | |
1300 | 1327 | | |
1301 | 1328 | | |
| |||
0 commit comments