ltc: concrete core::coin::ICoinNode (CoinNode) for P2 WorkView seam [PR-A/3]#79
Merged
Merged
Conversation
Cluster A of the web_server core-seam fold (base 4c4b08b, btc-embedded P2 WorkView seam). Additive LTC reference impl of core::coin::ICoinNode: - NEW src/impl/ltc/coin/coin_node.{hpp,cpp}: concrete CoinNode collapsing the embedded-vs-rpc getwork decision and the full WorkData (incl. m_txs) retention coin-side; exposes only the agnostic WorkView + 2-arg submit_block_hex across the seam. MWEB arity bridged with mweb="" (the sole pre-seam caller already passed ""); standing flag noted in-source. - src/c2pool/c2pool_refactored.cpp: retype the integrated rpc/embedded and solo wiring sites from set_coin_rpc/set_embedded_node(concrete ltc types) to set_coin_node(ICoinNode*); own the CoinNode before web_server so it outlives it. - src/impl/ltc/coin/CMakeLists.txt: add coin_node sources. Pushed for btc-heap-opt to fetch and fold with Cluster B (btc OBJECT lib + btc mirror) into one signed head. Does not link standalone (btc side still red until B). Linux x86_64 four-coin ctest to be re-run first-hand at the combined nm-clean head before the seam-gate flip.
…es.hpp PR-A inserted #include <impl/ltc/coin/coin_node.hpp> before node.hpp in c2pool_refactored.cpp. coin_node.hpp transitively pulls btclibs/serialize.h, which #undefs READWRITE and redefines it to the (s, ser_action, ...) form. With the include placed first, the MESSAGE_FIELDS macros in messages.hpp (reached via node.hpp) expand against that wrong READWRITE, yielding "use of undeclared identifier s / ser_action" under AppleClang/arm64. Move the include to after node.hpp/messages.hpp so the preprocessor state at the messages.hpp expansion point is identical to the pre-PR-A build (green on all platforms). coin_node.hpp and the following config.hpp use no serialize macros, so nothing downstream is affected. Behaviour-preserving; additive.
btclibs/serialize.h re-#defines READWRITE to the legacy (s, ser_action) contract and was winning by include order over core/pack.hpp (formatter, stream), breaking every C2POOL_SERIALIZE_METHODS body in this header (use of undeclared identifier s / ser_action on macOS arm64, Linux, Analyze). Re-assert the core contract so the header is include-order independent; mirrors btc/coin/p2p_messages.hpp. No message semantics change.
c2pool_refactored.cpp wired the new web_server.set_coin_node(CoinNode*) seam, but that API only lands with the PR-C web_server ICoinNode retype. On master it does not exist, so the Linux x86_64 aggregate failed to compile A standalone (missing-member), independent of the macOS READWRITE fix. Revert this file to master (restore set_coin_rpc/set_embedded_node). The macOS arm64 fix (base_p2p_messages.hpp READWRITE re-assert) and the additive ltc::coin::CoinNode type stay in A; CoinNode depends only on the core seam foundation (node_iface.hpp + work_view.hpp) already on master, so it compiles standalone. Wiring CoinNode into web_server moves to PR-C.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR-A/3 — ltc concrete core::coin::ICoinNode (CoinNode)
Additive ltc concrete implementation of the core::coin::ICoinNode P2 WorkView seam
(seam foundation b8db2c9 + btc concrete 4c4b08b already on master via #69).
Scope — per-coin isolation, no src/core churn:
Chain: A [this] then B [#78] then C [web_server retype, authored next, binds the A merge SHA].
Note: this PR is intentionally additive and does NOT touch web_server, so btc-smoke
[Coin matrix / Linux x86_64] stays RED on its own — that is expected. A is the pure
prerequisite that PR-C binds to in order to actually clear btc-smoke. PR-A should be
green standalone.