Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions scripts/verify_archival.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ echo

# Check that refactored version is present and active
echo "🚀 Checking Active Implementation..."
if [ -f "src/c2pool/c2pool_refactored.cpp" ]; then
echo "✅ c2pool_refactored.cpp - ACTIVE IMPLEMENTATION"
if [ -f "src/c2pool/main_ltc.cpp" ]; then
echo "✅ main_ltc.cpp - ACTIVE IMPLEMENTATION"
else
echo "❌ c2pool_refactored.cpp - MISSING (CRITICAL ERROR)"
echo "❌ main_ltc.cpp - MISSING (CRITICAL ERROR)"
fi

echo
Expand All @@ -71,14 +71,14 @@ echo
echo "🔨 Checking Build Targets..."
if [ -f "build/src/c2pool/c2pool" ]; then
echo "✅ c2pool - PRIMARY EXECUTABLE BUILT"
echo " └─ Built from: c2pool_refactored.cpp"
echo " └─ Built from: main_ltc.cpp"
else
echo "❌ c2pool - PRIMARY EXECUTABLE NOT FOUND"
fi

if [ -f "build/src/c2pool/c2pool_enhanced" ]; then
echo "✅ c2pool_enhanced - ENHANCED EXECUTABLE BUILT"
echo " └─ Built from: c2pool_refactored.cpp"
echo " └─ Built from: main_ltc.cpp"
else
echo "❌ c2pool_enhanced - ENHANCED EXECUTABLE NOT FOUND"
fi
Expand Down Expand Up @@ -131,7 +131,7 @@ echo "==================="
echo
archive_count=$(ls -1 archive/*.cpp 2>/dev/null | wc -l)
echo "📁 Archived files: $archive_count"
echo "🚀 Active implementation: c2pool_refactored.cpp"
echo "🚀 Active implementation: main_ltc.cpp"
echo "🎯 Primary executable: c2pool"
echo "⭐ Enhanced executable: c2pool_enhanced"
echo
Expand All @@ -143,9 +143,9 @@ if [ -f "archive/c2pool_legacy.cpp" ]; then
echo " Legacy c2pool.cpp: $legacy_size lines"
fi

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

echo
Expand All @@ -165,6 +165,6 @@ echo
echo "🎉 LEGACY ARCHIVAL COMPLETE!"
echo
echo "All future development should use:"
echo " Source: src/c2pool/c2pool_refactored.cpp"
echo " Source: src/c2pool/main_ltc.cpp"
echo " Build: make c2pool"
echo " Run: ./c2pool --help"
29 changes: 27 additions & 2 deletions src/c2pool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ endif()
string(REGEX REPLACE "^v" "" C2POOL_GIT_VERSION "${C2POOL_GIT_VERSION}")

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

# Enhanced version with explicit name (for backward compatibility)
add_executable(c2pool_enhanced c2pool_refactored.cpp)
add_executable(c2pool_enhanced main_ltc.cpp)
target_link_libraries(c2pool_enhanced
c2pool_node_enhanced
c2pool_payout
Expand All @@ -137,6 +137,28 @@ target_link_libraries(c2pool_enhanced
)
target_link_libraries(c2pool_enhanced c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39)

# c2pool-ltc: LTC (+ embedded DOGE aux merged-mining) reference entrypoint.
# The coin-matrix / release presence gate keys on src/c2pool/main_ltc.cpp
# (see PR #66); this target packages the LTC binary as c2pool-ltc. LTC is the
# reference coin, so this mirrors the c2pool_enhanced link set exactly (c2pool
# and c2pool_enhanced already build the same LTC-native main). DOGE aux rides
# via c2pool_merged_mining -- always compiled in, NO -DAUX_DOGE flag.
add_executable(c2pool-ltc main_ltc.cpp)
target_compile_definitions(c2pool-ltc PRIVATE C2POOL_VERSION="${C2POOL_GIT_VERSION}")
target_link_libraries(c2pool-ltc
c2pool_node_enhanced
c2pool_payout
c2pool_merged_mining
core
ltc
c2pool_storage
ltc_coin
nmc_coin # NMC coin-layer: out-of-line Transaction/MutableTransaction ctors for embedded merged-mining (2b-ii)
nlohmann_json::nlohmann_json
${Boost_LIBRARIES}
)
target_link_libraries(c2pool-ltc c2pool_hashrate pool) # OBJECT-lib SCC direct-naming (#22/#39)

# c2pool-btc: BTC SPV embedded p2pool — Phase B0 scaffold (stub entry).
# Library `btc` is a clone of `ltc` with namespace renamed and CMake targets
# adjusted; real entry-point port is in later B-phases.
Expand Down Expand Up @@ -302,13 +324,16 @@ target_link_libraries(c2pool-dash
if(WIN32)
target_link_libraries(c2pool ws2_32 mswsock bcrypt dbghelp)
target_link_libraries(c2pool_enhanced ws2_32 mswsock bcrypt dbghelp)
target_link_libraries(c2pool-ltc ws2_32 mswsock bcrypt dbghelp)
endif()
if(MSVC)
target_compile_options(c2pool PRIVATE /bigobj)
target_compile_options(c2pool_enhanced PRIVATE /bigobj)
target_compile_options(c2pool-ltc PRIVATE /bigobj)
# Match Linux 8MB stack (MSVC default is 1MB — deep share validation can overflow)
target_link_options(c2pool PRIVATE /STACK:8388608)
target_link_options(c2pool_enhanced PRIVATE /STACK:8388608)
target_link_options(c2pool-ltc PRIVATE /STACK:8388608)
endif()

# Test applications
Expand Down
File renamed without changes.
Loading