@@ -72,8 +72,10 @@ class CoinNodeInterface {
7272// NON-CONSENSUS: this function only SHAPES values; it never derives or alters
7373// the consensus-bearing coinbasevalue. That value is computed by the caller
7474// through the #207 resolve_coinbase_value -> subsidy_func SSOT and passed in
75- // verbatim. The builder fabricates nothing: transactions[] stays empty
76- // (embedded mempool tx selection is not wired, fees stay 0), previousblockhash
75+ // verbatim. The builder fabricates nothing: transactions[] is a caller-supplied
76+ // pass-through (empty by default until a mempool tx source is wired -- truthful
77+ // absence, never a fabricated tx; the fee total is folded into coinbasevalue
78+ // UPSTREAM via resolve_coinbase_value, not here), previousblockhash
7779// is emitted ONLY when the caller supplies a real tip hash (truthful absence,
7880// never a fabricated id), and `bits` is held back entirely -- DGB Core's live
7981// next-target is MultiShield V4 (a global 5-algo window == V37), so a
@@ -96,6 +98,16 @@ struct WorkTemplateInputs {
9698 // caller (work source: u256_be_display_hex). nullopt -> previousblockhash
9799 // omitted from the template.
98100 std::optional<std::string> previousblockhash;
101+ // GBT transactions[] array, already shaped by the caller (per-tx
102+ // {data,txid,hash,fee} objects, the same shape btc's template_builder
103+ // emits). The builder passes it through VERBATIM and shapes nothing -- the
104+ // identical truthful-absence discipline as previousblockhash: it defaults
105+ // to an empty array, so a caller that has wired no transaction source (the
106+ // current embedded + stratum paths) emits an empty transactions[] and
107+ // fabricates nothing. The fee total those txs carry is folded into
108+ // coinbasevalue UPSTREAM via resolve_coinbase_value(total_fees) (#207 SSOT);
109+ // the builder never derives the reward, so this field is display-only shape.
110+ nlohmann::json transactions = nlohmann::json::array();
99111};
100112
101113inline nlohmann::json build_work_template (const WorkTemplateInputs& in)
@@ -122,7 +134,7 @@ inline nlohmann::json build_work_template(const WorkTemplateInputs& in)
122134 tmpl[" version" ] = version;
123135 tmpl[" curtime" ] = in.curtime ;
124136 tmpl[" mintime" ] = mintime;
125- tmpl[" transactions" ] = nlohmann::json::array ();
137+ tmpl[" transactions" ] = in. transactions ; // caller-supplied; empty by default
126138
127139 // previousblockhash: truthful conditional emit (see struct notes).
128140 if (in.previousblockhash )
0 commit comments