Commit e95fc7e
authored
web: auto-detected per-node topology endpoint + per-coin stats seam (D0.2/D0.3) (#324)
Adds GET /api/node_topology, the truthful per-node topology surface for the
6-coin fleet (LTC/DOGE/BTC/DGB/DASH/BCH). Each node runs a different coin set
+ embedded daemons; the dashboard must reflect THAT node's REAL shape, not a
hardcoded LTC+DOGE assumption.
D0.2 (auto-detect): rest_node_topology() derives the coin set from live state
-- the keys of the coin-peer map (an LTC node also runs embedded DOGE, etc.)
plus this node's own chain (m_blockchain) -- and labels the primary coin with
the real is_embedded()/has_rpc() flags from the connected coin node. No baked
-in coin shape.
D0.3 (seam): optional node_topology_fn provider hook. When the wiring layer
registers one it supplies richer per-coin stats (synced flag, per-coin
hashrate) and overrides the auto-detect; when unset the auto-detect keeps the
endpoint truthful. Clean override-or-detect seam for each coin to feed its own
real stats.
Purely additive. Web/diagnostic layer only -- no consensus, sharechain, or
wire change. web_server.cpp.o compiles clean.
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>1 parent c756ff8 commit e95fc7e
2 files changed
Lines changed: 85 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
383 | 385 | | |
384 | 386 | | |
385 | 387 | | |
| |||
5107 | 5109 | | |
5108 | 5110 | | |
5109 | 5111 | | |
| 5112 | + | |
| 5113 | + | |
| 5114 | + | |
| 5115 | + | |
| 5116 | + | |
| 5117 | + | |
| 5118 | + | |
| 5119 | + | |
| 5120 | + | |
| 5121 | + | |
| 5122 | + | |
| 5123 | + | |
| 5124 | + | |
| 5125 | + | |
| 5126 | + | |
| 5127 | + | |
| 5128 | + | |
| 5129 | + | |
| 5130 | + | |
| 5131 | + | |
| 5132 | + | |
| 5133 | + | |
| 5134 | + | |
| 5135 | + | |
| 5136 | + | |
| 5137 | + | |
| 5138 | + | |
| 5139 | + | |
| 5140 | + | |
| 5141 | + | |
| 5142 | + | |
| 5143 | + | |
| 5144 | + | |
| 5145 | + | |
| 5146 | + | |
| 5147 | + | |
| 5148 | + | |
| 5149 | + | |
| 5150 | + | |
| 5151 | + | |
| 5152 | + | |
| 5153 | + | |
| 5154 | + | |
| 5155 | + | |
| 5156 | + | |
| 5157 | + | |
| 5158 | + | |
| 5159 | + | |
| 5160 | + | |
| 5161 | + | |
| 5162 | + | |
| 5163 | + | |
| 5164 | + | |
| 5165 | + | |
| 5166 | + | |
| 5167 | + | |
| 5168 | + | |
| 5169 | + | |
| 5170 | + | |
| 5171 | + | |
| 5172 | + | |
| 5173 | + | |
| 5174 | + | |
| 5175 | + | |
| 5176 | + | |
| 5177 | + | |
| 5178 | + | |
| 5179 | + | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
5110 | 5185 | | |
5111 | 5186 | | |
5112 | 5187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
509 | 518 | | |
510 | 519 | | |
511 | 520 | | |
| |||
1016 | 1025 | | |
1017 | 1026 | | |
1018 | 1027 | | |
| 1028 | + | |
1019 | 1029 | | |
1020 | 1030 | | |
1021 | 1031 | | |
| |||
0 commit comments