Skip to content

Commit 1aa0bf2

Browse files
authored
Merge pull request #669 from frstrtr/ltc-doge/c2pool-ltc-entrypoint
ltc: add c2pool-ltc release entrypoint (main_ltc.cpp) — close the hollow-green skip
2 parents b21596f + 217e0d9 commit 1aa0bf2

3 files changed

Lines changed: 37 additions & 12 deletions

File tree

scripts/verify_archival.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ echo
5959

6060
# Check that refactored version is present and active
6161
echo "🚀 Checking Active Implementation..."
62-
if [ -f "src/c2pool/c2pool_refactored.cpp" ]; then
63-
echo "c2pool_refactored.cpp - ACTIVE IMPLEMENTATION"
62+
if [ -f "src/c2pool/main_ltc.cpp" ]; then
63+
echo "main_ltc.cpp - ACTIVE IMPLEMENTATION"
6464
else
65-
echo "c2pool_refactored.cpp - MISSING (CRITICAL ERROR)"
65+
echo "main_ltc.cpp - MISSING (CRITICAL ERROR)"
6666
fi
6767

6868
echo
@@ -71,14 +71,14 @@ echo
7171
echo "🔨 Checking Build Targets..."
7272
if [ -f "build/src/c2pool/c2pool" ]; then
7373
echo "✅ c2pool - PRIMARY EXECUTABLE BUILT"
74-
echo " └─ Built from: c2pool_refactored.cpp"
74+
echo " └─ Built from: main_ltc.cpp"
7575
else
7676
echo "❌ c2pool - PRIMARY EXECUTABLE NOT FOUND"
7777
fi
7878

7979
if [ -f "build/src/c2pool/c2pool_enhanced" ]; then
8080
echo "✅ c2pool_enhanced - ENHANCED EXECUTABLE BUILT"
81-
echo " └─ Built from: c2pool_refactored.cpp"
81+
echo " └─ Built from: main_ltc.cpp"
8282
else
8383
echo "❌ c2pool_enhanced - ENHANCED EXECUTABLE NOT FOUND"
8484
fi
@@ -131,7 +131,7 @@ echo "==================="
131131
echo
132132
archive_count=$(ls -1 archive/*.cpp 2>/dev/null | wc -l)
133133
echo "📁 Archived files: $archive_count"
134-
echo "🚀 Active implementation: c2pool_refactored.cpp"
134+
echo "🚀 Active implementation: main_ltc.cpp"
135135
echo "🎯 Primary executable: c2pool"
136136
echo "⭐ Enhanced executable: c2pool_enhanced"
137137
echo
@@ -143,9 +143,9 @@ if [ -f "archive/c2pool_legacy.cpp" ]; then
143143
echo " Legacy c2pool.cpp: $legacy_size lines"
144144
fi
145145

146-
if [ -f "src/c2pool/c2pool_refactored.cpp" ]; then
147-
refactored_size=$(wc -l < src/c2pool/c2pool_refactored.cpp)
148-
echo " Refactored c2pool_refactored.cpp: $refactored_size lines"
146+
if [ -f "src/c2pool/main_ltc.cpp" ]; then
147+
refactored_size=$(wc -l < src/c2pool/main_ltc.cpp)
148+
echo " Refactored main_ltc.cpp: $refactored_size lines"
149149
fi
150150

151151
echo
@@ -165,6 +165,6 @@ echo
165165
echo "🎉 LEGACY ARCHIVAL COMPLETE!"
166166
echo
167167
echo "All future development should use:"
168-
echo " Source: src/c2pool/c2pool_refactored.cpp"
168+
echo " Source: src/c2pool/main_ltc.cpp"
169169
echo " Build: make c2pool"
170170
echo " Run: ./c2pool --help"

src/c2pool/CMakeLists.txt

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ endif()
103103
string(REGEX REPLACE "^v" "" C2POOL_GIT_VERSION "${C2POOL_GIT_VERSION}")
104104

105105
# Main C2Pool Enhanced Application (refactored with mining_shares/p2p_shares separation)
106-
add_executable(c2pool c2pool_refactored.cpp)
106+
add_executable(c2pool main_ltc.cpp)
107107
target_compile_definitions(c2pool PRIVATE C2POOL_VERSION="${C2POOL_GIT_VERSION}")
108108
target_link_libraries(c2pool
109109
c2pool_node_enhanced
@@ -122,7 +122,7 @@ target_link_libraries(c2pool
122122
target_link_libraries(c2pool c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39)
123123

124124
# Enhanced version with explicit name (for backward compatibility)
125-
add_executable(c2pool_enhanced c2pool_refactored.cpp)
125+
add_executable(c2pool_enhanced main_ltc.cpp)
126126
target_link_libraries(c2pool_enhanced
127127
c2pool_node_enhanced
128128
c2pool_payout
@@ -137,6 +137,28 @@ target_link_libraries(c2pool_enhanced
137137
)
138138
target_link_libraries(c2pool_enhanced c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39)
139139

140+
# c2pool-ltc: LTC (+ embedded DOGE aux merged-mining) reference entrypoint.
141+
# The coin-matrix / release presence gate keys on src/c2pool/main_ltc.cpp
142+
# (see PR #66); this target packages the LTC binary as c2pool-ltc. LTC is the
143+
# reference coin, so this mirrors the c2pool_enhanced link set exactly (c2pool
144+
# and c2pool_enhanced already build the same LTC-native main). DOGE aux rides
145+
# via c2pool_merged_mining -- always compiled in, NO -DAUX_DOGE flag.
146+
add_executable(c2pool-ltc main_ltc.cpp)
147+
target_compile_definitions(c2pool-ltc PRIVATE C2POOL_VERSION="${C2POOL_GIT_VERSION}")
148+
target_link_libraries(c2pool-ltc
149+
c2pool_node_enhanced
150+
c2pool_payout
151+
c2pool_merged_mining
152+
core
153+
ltc
154+
c2pool_storage
155+
ltc_coin
156+
nmc_coin # NMC coin-layer: out-of-line Transaction/MutableTransaction ctors for embedded merged-mining (2b-ii)
157+
nlohmann_json::nlohmann_json
158+
${Boost_LIBRARIES}
159+
)
160+
target_link_libraries(c2pool-ltc c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39)
161+
140162
# c2pool-btc: BTC SPV embedded p2pool — Phase B0 scaffold (stub entry).
141163
# Library `btc` is a clone of `ltc` with namespace renamed and CMake targets
142164
# adjusted; real entry-point port is in later B-phases.
@@ -302,13 +324,16 @@ target_link_libraries(c2pool-dash
302324
if(WIN32)
303325
target_link_libraries(c2pool ws2_32 mswsock bcrypt dbghelp)
304326
target_link_libraries(c2pool_enhanced ws2_32 mswsock bcrypt dbghelp)
327+
target_link_libraries(c2pool-ltc ws2_32 mswsock bcrypt dbghelp)
305328
endif()
306329
if(MSVC)
307330
target_compile_options(c2pool PRIVATE /bigobj)
308331
target_compile_options(c2pool_enhanced PRIVATE /bigobj)
332+
target_compile_options(c2pool-ltc PRIVATE /bigobj)
309333
# Match Linux 8MB stack (MSVC default is 1MB — deep share validation can overflow)
310334
target_link_options(c2pool PRIVATE /STACK:8388608)
311335
target_link_options(c2pool_enhanced PRIVATE /STACK:8388608)
336+
target_link_options(c2pool-ltc PRIVATE /STACK:8388608)
312337
endif()
313338

314339
# Test applications

0 commit comments

Comments
 (0)