Skip to content

[WIP] web: collapse triplicated share_version switch in rest_web_currency_info - #935

Closed
frstrtr wants to merge 1 commit into
masterfrom
web/dedup-share-version-currency-info
Closed

[WIP] web: collapse triplicated share_version switch in rest_web_currency_info#935
frstrtr wants to merge 1 commit into
masterfrom
web/dedup-share-version-currency-info

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Refactor: collapse three duplicated share_version switch blocks into one in rest_web_currency_info. Behaviour-preserving. Draft for CI.

rest_web_currency_info() set result["share_version"] via three
byte-for-byte identical switch(m_blockchain) blocks back to back —
a merge artifact. The second and third are pure dead code: each
rewrites the key the prior block already set to the same value.

Collapse to a single block. No behavior change (the emitted JSON is
identical); removes 22 lines of redundant code on the web/API layer.
@frstrtr
frstrtr marked this pull request as ready for review July 28, 2026 08:46
@frstrtr

frstrtr commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

Closing as OBSOLETE — superseded by #491 (9445b46b), and merging this would be a regression.

This branch was authored 2026-06-23 and is 863 commits behind master. Since then, 9445b46b ("web(currency_info): report LIVE ratchet share_version, not static 36", #491) already collapsed the triplicated switch (m_blockchain) in rest_web_currency_info — and did it better.

Master today:

default:  result["share_version"] = m_cached_share_version;  break;

This branch:

default:  result["share_version"] = 36;  break;

The difference is not cosmetic. Master's own comment states why: during the V35→V36 cross, a node that is still VOTING is producing V35 shares, so reporting a static 36 "would make the explorer misclassify live V35 share cells as V36 — a lie about the crossing state."

So resolving this branch's conflict in its own favour would reintroduce exactly the dishonest-surface defect this lane exists to eliminate. The dedup goal is already achieved on master; nothing here remains to land.

No action needed on the other CI signals — the attribution-gate FAILURE shown in the rollup is a stale first run from 2026-06-23T23:06 on SHA 2a0b1270; the same gate re-ran green twice on that same SHA at 23:20 and 23:53.

@frstrtr frstrtr closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant