Commit 6de623b
committed
dash(S8): DASHWorkSource 4b .cpp bodies + dash_stratum OBJECT lib + KAT
Stage 4b for the DASHWorkSource stratum accept-loop seam (follow-on to the
4a header skeleton). Gives the concrete core::stratum::IWorkSource a linkable
definition so it is INSTANTIABLE and holdable via shared_ptr<IWorkSource> by a
future core::StratumServer, before the substantive X11 work-assembly lands.
work_source.cpp (new):
- constructor binding the NON-OWNING NodeCoinState reference (embedded arm),
the REQUIRED dashd getblocktemplate fallback closure (GBT-XCHECK safety,
never removed), and the dual-path won-block submit callback;
- real bodies: get_best_share_hash_fn / set_best_share_hash_fn (locked),
has_merged_chain (false, standalone X11), the per-connection worker
registry (register/update/unregister, idempotent on unknown sessions);
- fused get_work() adapter over the free dash::stratum::get_work() capstone
(#698): embedded when the coin-state is populated, retained dashd fallback
on a set-gap;
- work-generation / coinbase / mining_submit / compute_share_difficulty held
at documented SAFE DEFAULTS (empty template, reject, 0.0 sentinel) for
4c/4d -- mirrors dgb::stratum::DGBWorkSource 4a->4b->4c->4d progression.
dash_stratum OBJECT lib (stratum/CMakeLists.txt + add_subdirectory): SAFE-ADDITIVE,
compiled here, linked only by the KAT now (and c2pool-dash in a later slice), so
ltc/btc/doge/dgb build + ctest surfaces stay untouched. Per-coin isolation held:
src/impl/dash only, dashd RPC fallback preserved.
test_dash_stratum_work_source (new, 11 KATs, Linux x86_64 11/11): construction +
full IWorkSource contract, config defaults, work-generation counter, share-target
atomics, worker registry, best-share callback, 4b safe-default assertions, and the
fused get_work() routing to the retained dashd fallback on an unpopulated
coin-state. Added to BOTH build.yml --target allowlists (NOT_BUILT sentinel guard).1 parent 7aacd01 commit 6de623b
7 files changed
Lines changed: 490 additions & 2 deletions
File tree
- .github/workflows
- src/impl/dash
- stratum
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments