Skip to content

Commit 37446a2

Browse files
committed
dgb: wire impl_dgb pool/share OBJECT lib for B1 build gate
Add the dgb OBJECT lib (target: dgb) to src/impl/dgb/CMakeLists.txt under COIN_DGB, mirroring the ltc OBJECT lib that the B1 surface was ported from. The B1 sharechain-verify surface (share_types/share/share_tracker/ share_check/share_messages/redistribute) is header-only, so b1_smoke.cpp is added as the sole compile unit, giving the surface a whole-target build gate (per-coin dgb smoke). Real pool-layer TUs replace it as they land. Per-coin isolation invariant preserved: dgb-tree-only scaffolding, no change to the per-coin source-presence guards (PR #47).
1 parent 613cade commit 37446a2

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

src/impl/dgb/CMakeLists.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,25 @@
2929
if(COIN_DGB)
3030
message(STATUS "c2pool: DGB Scrypt-only coin module enabled (skeleton)")
3131
add_subdirectory(coin)
32-
# add_subdirectory(daemon)
33-
# add_subdirectory(test)
32+
33+
# impl_dgb pool/share-layer OBJECT lib (Phase B / B1). Mirrors the ltc OBJECT
34+
# lib (dgb was ported verbatim from src/impl/ltc, Scrypt parent) per the
35+
# ci-steward OBJECT-lib direct-naming convention (#22/#39). B1 is header-only,
36+
# so b1_smoke.cpp is the sole compile unit giving the surface a whole-target
37+
# build gate; real TUs (config_pool.cpp/node.cpp/protocol_actual.cpp/
38+
# protocol_legacy.cpp) replace it as dgb-scrypt-steward lands them.
39+
add_library(dgb OBJECT
40+
b1_smoke.cpp
41+
share_types.hpp share.hpp
42+
share_tracker.hpp share_check.hpp share_messages.hpp
43+
redistribute.hpp
44+
config_coin.hpp config_pool.hpp
45+
messages.hpp node.hpp peer.hpp
46+
# auto_ratchet.hpp / donation_consensus.hpp: PILLAR 1/4, gated -- not compiled here
47+
)
48+
49+
target_link_libraries(dgb core pool sharechain dgb_coin btclibs c2pool_storage ${SECP256K1_LIBRARIES})
50+
51+
# add_subdirectory(daemon) # M3
52+
# add_subdirectory(test) # B-later: share_test references LTC types
3453
endif()

src/impl/dgb/b1_smoke.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// DGB Phase B (B1) sharechain-verify surface — compile-gate translation unit.
2+
//
3+
// The B1 surface (share_types / share / share_tracker / share_check /
4+
// share_messages / redistribute) is header-only at B1: each header passes
5+
// g++ -std=c++20 -fsyntax-only individually, but nothing instantiates them
6+
// inside a real translation unit, so a whole-target compile gate did not yet
7+
// exist. This TU gives the dgb OBJECT lib one compilable source so the surface
8+
// builds AS A UNIT (per-coin dgb smoke gate), turning header-graph breakage
9+
// into a build failure instead of latent rot.
10+
//
11+
// ci-steward build-gate scaffolding (dgb-tree-only). REMOVE this file once the
12+
// real dgb pool-layer translation units land (config_pool.cpp / node.cpp /
13+
// protocol_actual.cpp / protocol_legacy.cpp, owned by dgb-scrypt-steward) and
14+
// supply the OBJECT lib with genuine symbols.
15+
#include "share_types.hpp"
16+
#include "share.hpp"
17+
#include "share_tracker.hpp"
18+
#include "share_check.hpp"
19+
#include "share_messages.hpp"
20+
#include "redistribute.hpp"

0 commit comments

Comments
 (0)