Branch data Line data Source code
1 : : // Generated by mpgen from /__w/b-c-cov/b-c-cov/bitcoin-core/src/ipc/capnp/mining.capnp
2 : :
3 : : #ifndef CAPNP_MINING_CAPNP_PROXY_H
4 : : #define CAPNP_MINING_CAPNP_PROXY_H
5 : :
6 : : #include <capnp/mining.capnp.h> // IWYU pragma: keep
7 : : #include "interfaces/mining.h" // IWYU pragma: export
8 : : #include <mp/proxy.h>
9 : :
10 : : #if defined(__GNUC__)
11 : : #pragma GCC diagnostic push
12 : : #if !defined(__has_warning)
13 : : #pragma GCC diagnostic ignored "-Wsuggest-override"
14 : : #elif __has_warning("-Wsuggest-override")
15 : : #pragma GCC diagnostic ignored "-Wsuggest-override"
16 : : #endif
17 : : #endif
18 : : namespace mp {
19 : : template<>
20 : : struct ProxyMethod<ipc::capnp::messages::Mining::IsTestChainParams>
21 : : {
22 : : static constexpr auto impl = &interfaces::Mining::isTestChain;
23 : : };
24 : :
25 : : template<>
26 : : struct ProxyMethod<ipc::capnp::messages::Mining::IsInitialBlockDownloadParams>
27 : : {
28 : : static constexpr auto impl = &interfaces::Mining::isInitialBlockDownload;
29 : : };
30 : :
31 : : template<>
32 : : struct ProxyMethod<ipc::capnp::messages::Mining::GetTipParams>
33 : : {
34 : : static constexpr auto impl = &interfaces::Mining::getTip;
35 : : };
36 : :
37 : : template<>
38 : : struct ProxyMethod<ipc::capnp::messages::Mining::WaitTipChangedParams>
39 : : {
40 : : static constexpr auto impl = &interfaces::Mining::waitTipChanged;
41 : : };
42 : :
43 : : template<>
44 : : struct ProxyMethod<ipc::capnp::messages::Mining::CreateNewBlockParams>
45 : : {
46 : : static constexpr auto impl = &interfaces::Mining::createNewBlock;
47 : : };
48 : :
49 : : template<>
50 : : struct ProxyMethod<ipc::capnp::messages::Mining::CheckBlockParams>
51 : : {
52 : : static constexpr auto impl = &interfaces::Mining::checkBlock;
53 : : };
54 : :
55 : : template<>
56 : : struct ProxyMethod<ipc::capnp::messages::Mining::InterruptParams>
57 : : {
58 : : static constexpr auto impl = &interfaces::Mining::interrupt;
59 : : };
60 : :
61 : : template<>
62 : : struct ProxyMethod<ipc::capnp::messages::Mining::SubmitBlockParams>
63 : : {
64 : : static constexpr auto impl = &interfaces::Mining::submitBlock;
65 : : };
66 : :
67 : : template<>
68 : : struct ProxyMethod<ipc::capnp::messages::Mining::GetTransactionsByTxIDParams>
69 : : {
70 : : static constexpr auto impl = &interfaces::Mining::getTransactionsByTxID;
71 : : };
72 : :
73 : : template<>
74 : : struct ProxyMethod<ipc::capnp::messages::Mining::GetTransactionsByWitnessIDParams>
75 : : {
76 : : static constexpr auto impl = &interfaces::Mining::getTransactionsByWitnessID;
77 : : };
78 : :
79 : : template<>
80 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetBlockHeaderParams>
81 : : {
82 : : static constexpr auto impl = &interfaces::BlockTemplate::getBlockHeader;
83 : : };
84 : :
85 : : template<>
86 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetBlockParams>
87 : : {
88 : : static constexpr auto impl = &interfaces::BlockTemplate::getBlock;
89 : : };
90 : :
91 : : template<>
92 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetTxFeesParams>
93 : : {
94 : : static constexpr auto impl = &interfaces::BlockTemplate::getTxFees;
95 : : };
96 : :
97 : : template<>
98 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetTxSigopsParams>
99 : : {
100 : : static constexpr auto impl = &interfaces::BlockTemplate::getTxSigops;
101 : : };
102 : :
103 : : template<>
104 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetCoinbaseTxParams>
105 : : {
106 : : static constexpr auto impl = &interfaces::BlockTemplate::getCoinbaseTx;
107 : : };
108 : :
109 : : template<>
110 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::GetCoinbaseMerklePathParams>
111 : : {
112 : : static constexpr auto impl = &interfaces::BlockTemplate::getCoinbaseMerklePath;
113 : : };
114 : :
115 : : template<>
116 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::SubmitSolutionOld7Params>
117 : : {
118 : : static constexpr auto impl = &interfaces::BlockTemplate::submitSolutionOld7;
119 : : };
120 : :
121 : : template<>
122 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::WaitNextParams>
123 : : {
124 : : static constexpr auto impl = &interfaces::BlockTemplate::waitNext;
125 : : };
126 : :
127 : : template<>
128 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::InterruptWaitParams>
129 : : {
130 : : static constexpr auto impl = &interfaces::BlockTemplate::interruptWait;
131 : : };
132 : :
133 : : template<>
134 : : struct ProxyMethod<ipc::capnp::messages::BlockTemplate::SubmitSolutionParams>
135 : : {
136 : : static constexpr auto impl = &interfaces::BlockTemplate::submitSolution;
137 : : };
138 : :
139 : : namespace mining_fields {
140 : : struct Context
141 : : {
142 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getContext()) { return s.getContext(); }
# # # # #
# # # # #
# # # # #
# # # # #
# # # # #
# # # # #
# # # # ]
143 : : template<typename S> static bool has(S&& s) { return s.hasContext(); }
144 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setContext(std::forward<A>(a)); }
145 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initContext(std::forward<A>(a)...); }
146 : : template<typename S> static bool getWant(S&& s) { return s.getWantContext(); }
147 : : template<typename S> static void setWant(S&& s) { s.setWantContext(true); }
148 : : template<typename S> static bool getHas(S&& s) { return s.getHasContext(); }
149 : : template<typename S> static void setHas(S&& s) { s.setHasContext(true); }
150 : : };
151 : : struct Result
152 : : {
153 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getResult()) { return s.getResult(); }
# # # # #
# # # ]
154 : 0 : template<typename S> static bool has(S&& s) { return s.hasResult(); }
155 [ # # ]: 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setResult(std::forward<A>(a)); }
156 [ # # # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initResult(std::forward<A>(a)...); }
157 : : template<typename S> static bool getWant(S&& s) { return s.getWantResult(); }
158 : : template<typename S> static void setWant(S&& s) { s.setWantResult(true); }
159 [ # # ]: 0 : template<typename S> static bool getHas(S&& s) { return s.getHasResult(); }
160 : 0 : template<typename S> static void setHas(S&& s) { s.setHasResult(true); }
161 : : };
162 : : struct CurrentTip
163 : : {
164 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCurrentTip()) { return s.getCurrentTip(); }
165 : 0 : template<typename S> static bool has(S&& s) { return s.hasCurrentTip(); }
166 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCurrentTip(std::forward<A>(a)); }
167 [ # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCurrentTip(std::forward<A>(a)...); }
168 : : template<typename S> static bool getWant(S&& s) { return s.getWantCurrentTip(); }
169 : : template<typename S> static void setWant(S&& s) { s.setWantCurrentTip(true); }
170 : : template<typename S> static bool getHas(S&& s) { return s.getHasCurrentTip(); }
171 : : template<typename S> static void setHas(S&& s) { s.setHasCurrentTip(true); }
172 : : };
173 : : struct Timeout
174 : : {
175 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getTimeout()) { return s.getTimeout(); }
# # ]
176 : : template<typename S> static bool has(S&& s) { return s.hasTimeout(); }
177 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setTimeout(std::forward<A>(a)); }
178 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initTimeout(std::forward<A>(a)...); }
179 : : template<typename S> static bool getWant(S&& s) { return s.getWantTimeout(); }
180 : : template<typename S> static void setWant(S&& s) { s.setWantTimeout(true); }
181 : : template<typename S> static bool getHas(S&& s) { return s.getHasTimeout(); }
182 : : template<typename S> static void setHas(S&& s) { s.setHasTimeout(true); }
183 : : };
184 : : struct Options
185 : : {
186 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getOptions()) { return s.getOptions(); }
187 : : template<typename S> static bool has(S&& s) { return s.hasOptions(); }
188 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setOptions(std::forward<A>(a)); }
189 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initOptions(std::forward<A>(a)...); }
190 : : template<typename S> static bool getWant(S&& s) { return s.getWantOptions(); }
191 : : template<typename S> static void setWant(S&& s) { s.setWantOptions(true); }
192 : : template<typename S> static bool getHas(S&& s) { return s.getHasOptions(); }
193 : : template<typename S> static void setHas(S&& s) { s.setHasOptions(true); }
194 : : };
195 : : struct Cooldown
196 : : {
197 [ # # # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCooldown()) { return s.getCooldown(); }
198 : : template<typename S> static bool has(S&& s) { return s.hasCooldown(); }
199 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCooldown(std::forward<A>(a)); }
200 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCooldown(std::forward<A>(a)...); }
201 : : template<typename S> static bool getWant(S&& s) { return s.getWantCooldown(); }
202 : : template<typename S> static void setWant(S&& s) { s.setWantCooldown(true); }
203 : : template<typename S> static bool getHas(S&& s) { return s.getHasCooldown(); }
204 : : template<typename S> static void setHas(S&& s) { s.setHasCooldown(true); }
205 : : };
206 : : struct Block
207 : : {
208 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getBlock()) { return s.getBlock(); }
209 : 0 : template<typename S> static bool has(S&& s) { return s.hasBlock(); }
210 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setBlock(std::forward<A>(a)); }
211 [ # # # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initBlock(std::forward<A>(a)...); }
212 : : template<typename S> static bool getWant(S&& s) { return s.getWantBlock(); }
213 : : template<typename S> static void setWant(S&& s) { s.setWantBlock(true); }
214 : : template<typename S> static bool getHas(S&& s) { return s.getHasBlock(); }
215 : : template<typename S> static void setHas(S&& s) { s.setHasBlock(true); }
216 : : };
217 : : struct Reason
218 : : {
219 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getReason()) { return s.getReason(); }
220 : : template<typename S> static bool has(S&& s) { return s.hasReason(); }
221 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setReason(std::forward<A>(a)); }
222 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initReason(std::forward<A>(a)...); }
223 : : template<typename S> static bool getWant(S&& s) { return s.getWantReason(); }
224 : : template<typename S> static void setWant(S&& s) { s.setWantReason(true); }
225 : : template<typename S> static bool getHas(S&& s) { return s.getHasReason(); }
226 : : template<typename S> static void setHas(S&& s) { s.setHasReason(true); }
227 : : };
228 : : struct Debug
229 : : {
230 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getDebug()) { return s.getDebug(); }
231 : : template<typename S> static bool has(S&& s) { return s.hasDebug(); }
232 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setDebug(std::forward<A>(a)); }
233 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initDebug(std::forward<A>(a)...); }
234 : : template<typename S> static bool getWant(S&& s) { return s.getWantDebug(); }
235 : : template<typename S> static void setWant(S&& s) { s.setWantDebug(true); }
236 : : template<typename S> static bool getHas(S&& s) { return s.getHasDebug(); }
237 : : template<typename S> static void setHas(S&& s) { s.setHasDebug(true); }
238 : : };
239 : : struct Txids
240 : : {
241 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getTxids()) { return s.getTxids(); }
242 : : template<typename S> static bool has(S&& s) { return s.hasTxids(); }
243 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setTxids(std::forward<A>(a)); }
244 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initTxids(std::forward<A>(a)...); }
245 : : template<typename S> static bool getWant(S&& s) { return s.getWantTxids(); }
246 : : template<typename S> static void setWant(S&& s) { s.setWantTxids(true); }
247 : : template<typename S> static bool getHas(S&& s) { return s.getHasTxids(); }
248 : : template<typename S> static void setHas(S&& s) { s.setHasTxids(true); }
249 : : };
250 : : struct Wtxids
251 : : {
252 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getWtxids()) { return s.getWtxids(); }
253 : : template<typename S> static bool has(S&& s) { return s.hasWtxids(); }
254 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setWtxids(std::forward<A>(a)); }
255 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initWtxids(std::forward<A>(a)...); }
256 : : template<typename S> static bool getWant(S&& s) { return s.getWantWtxids(); }
257 : : template<typename S> static void setWant(S&& s) { s.setWantWtxids(true); }
258 : : template<typename S> static bool getHas(S&& s) { return s.getHasWtxids(); }
259 : : template<typename S> static void setHas(S&& s) { s.setHasWtxids(true); }
260 : : };
261 : : struct Version
262 : : {
263 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getVersion()) { return s.getVersion(); }
# # # # ]
[ # # # #
# # # # ]
264 : : template<typename S> static bool has(S&& s) { return s.hasVersion(); }
265 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setVersion(std::forward<A>(a)); }
266 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initVersion(std::forward<A>(a)...); }
267 : : template<typename S> static bool getWant(S&& s) { return s.getWantVersion(); }
268 : : template<typename S> static void setWant(S&& s) { s.setWantVersion(true); }
269 : : template<typename S> static bool getHas(S&& s) { return s.getHasVersion(); }
270 : : template<typename S> static void setHas(S&& s) { s.setHasVersion(true); }
271 : : };
272 : : struct Timestamp
273 : : {
274 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getTimestamp()) { return s.getTimestamp(); }
# # # # ]
275 : : template<typename S> static bool has(S&& s) { return s.hasTimestamp(); }
276 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setTimestamp(std::forward<A>(a)); }
277 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initTimestamp(std::forward<A>(a)...); }
278 : : template<typename S> static bool getWant(S&& s) { return s.getWantTimestamp(); }
279 : : template<typename S> static void setWant(S&& s) { s.setWantTimestamp(true); }
280 : : template<typename S> static bool getHas(S&& s) { return s.getHasTimestamp(); }
281 : : template<typename S> static void setHas(S&& s) { s.setHasTimestamp(true); }
282 : : };
283 : : struct Nonce
284 : : {
285 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getNonce()) { return s.getNonce(); }
# # # # ]
286 : : template<typename S> static bool has(S&& s) { return s.hasNonce(); }
287 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setNonce(std::forward<A>(a)); }
288 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initNonce(std::forward<A>(a)...); }
289 : : template<typename S> static bool getWant(S&& s) { return s.getWantNonce(); }
290 : : template<typename S> static void setWant(S&& s) { s.setWantNonce(true); }
291 : : template<typename S> static bool getHas(S&& s) { return s.getHasNonce(); }
292 : : template<typename S> static void setHas(S&& s) { s.setHasNonce(true); }
293 : : };
294 : : struct Coinbase
295 : : {
296 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCoinbase()) { return s.getCoinbase(); }
297 : 0 : template<typename S> static bool has(S&& s) { return s.hasCoinbase(); }
298 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCoinbase(std::forward<A>(a)); }
299 [ # # # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCoinbase(std::forward<A>(a)...); }
300 : : template<typename S> static bool getWant(S&& s) { return s.getWantCoinbase(); }
301 : : template<typename S> static void setWant(S&& s) { s.setWantCoinbase(true); }
302 : : template<typename S> static bool getHas(S&& s) { return s.getHasCoinbase(); }
303 : : template<typename S> static void setHas(S&& s) { s.setHasCoinbase(true); }
304 : : };
305 : : struct UseMempool
306 : : {
307 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getUseMempool()) { return s.getUseMempool(); }
308 : : template<typename S> static bool has(S&& s) { return s.hasUseMempool(); }
309 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setUseMempool(std::forward<A>(a)); }
310 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initUseMempool(std::forward<A>(a)...); }
311 : : template<typename S> static bool getWant(S&& s) { return s.getWantUseMempool(); }
312 : : template<typename S> static void setWant(S&& s) { s.setWantUseMempool(true); }
313 : : template<typename S> static bool getHas(S&& s) { return s.getHasUseMempool(); }
314 : : template<typename S> static void setHas(S&& s) { s.setHasUseMempool(true); }
315 : : };
316 : : struct BlockReservedWeight
317 : : {
318 [ # # # # : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getBlockReservedWeight()) { return s.getBlockReservedWeight(); }
# # ]
319 : : template<typename S> static bool has(S&& s) { return s.hasBlockReservedWeight(); }
320 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setBlockReservedWeight(std::forward<A>(a)); }
321 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initBlockReservedWeight(std::forward<A>(a)...); }
322 : : template<typename S> static bool getWant(S&& s) { return s.getWantBlockReservedWeight(); }
323 : : template<typename S> static void setWant(S&& s) { s.setWantBlockReservedWeight(true); }
324 : : template<typename S> static bool getHas(S&& s) { return s.getHasBlockReservedWeight(); }
325 : : template<typename S> static void setHas(S&& s) { s.setHasBlockReservedWeight(true); }
326 : : };
327 : : struct CoinbaseOutputMaxAdditionalSigops
328 : : {
329 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCoinbaseOutputMaxAdditionalSigops()) { return s.getCoinbaseOutputMaxAdditionalSigops(); }
330 : : template<typename S> static bool has(S&& s) { return s.hasCoinbaseOutputMaxAdditionalSigops(); }
331 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCoinbaseOutputMaxAdditionalSigops(std::forward<A>(a)); }
332 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCoinbaseOutputMaxAdditionalSigops(std::forward<A>(a)...); }
333 : : template<typename S> static bool getWant(S&& s) { return s.getWantCoinbaseOutputMaxAdditionalSigops(); }
334 : : template<typename S> static void setWant(S&& s) { s.setWantCoinbaseOutputMaxAdditionalSigops(true); }
335 : : template<typename S> static bool getHas(S&& s) { return s.getHasCoinbaseOutputMaxAdditionalSigops(); }
336 : : template<typename S> static void setHas(S&& s) { s.setHasCoinbaseOutputMaxAdditionalSigops(true); }
337 : : };
338 : : struct FeeThreshold
339 : : {
340 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getFeeThreshold()) { return s.getFeeThreshold(); }
341 : : template<typename S> static bool has(S&& s) { return s.hasFeeThreshold(); }
342 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setFeeThreshold(std::forward<A>(a)); }
343 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initFeeThreshold(std::forward<A>(a)...); }
344 : : template<typename S> static bool getWant(S&& s) { return s.getWantFeeThreshold(); }
345 : : template<typename S> static void setWant(S&& s) { s.setWantFeeThreshold(true); }
346 : : template<typename S> static bool getHas(S&& s) { return s.getHasFeeThreshold(); }
347 : : template<typename S> static void setHas(S&& s) { s.setHasFeeThreshold(true); }
348 : : };
349 : : struct CheckMerkleRoot
350 : : {
351 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCheckMerkleRoot()) { return s.getCheckMerkleRoot(); }
352 : : template<typename S> static bool has(S&& s) { return s.hasCheckMerkleRoot(); }
353 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCheckMerkleRoot(std::forward<A>(a)); }
354 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCheckMerkleRoot(std::forward<A>(a)...); }
355 : : template<typename S> static bool getWant(S&& s) { return s.getWantCheckMerkleRoot(); }
356 : : template<typename S> static void setWant(S&& s) { s.setWantCheckMerkleRoot(true); }
357 : : template<typename S> static bool getHas(S&& s) { return s.getHasCheckMerkleRoot(); }
358 : : template<typename S> static void setHas(S&& s) { s.setHasCheckMerkleRoot(true); }
359 : : };
360 : : struct CheckPow
361 : : {
362 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCheckPow()) { return s.getCheckPow(); }
363 : : template<typename S> static bool has(S&& s) { return s.hasCheckPow(); }
364 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCheckPow(std::forward<A>(a)); }
365 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCheckPow(std::forward<A>(a)...); }
366 : : template<typename S> static bool getWant(S&& s) { return s.getWantCheckPow(); }
367 : : template<typename S> static void setWant(S&& s) { s.setWantCheckPow(true); }
368 : : template<typename S> static bool getHas(S&& s) { return s.getHasCheckPow(); }
369 : : template<typename S> static void setHas(S&& s) { s.setHasCheckPow(true); }
370 : : };
371 : : struct Sequence
372 : : {
373 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getSequence()) { return s.getSequence(); }
374 : : template<typename S> static bool has(S&& s) { return s.hasSequence(); }
375 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setSequence(std::forward<A>(a)); }
376 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initSequence(std::forward<A>(a)...); }
377 : : template<typename S> static bool getWant(S&& s) { return s.getWantSequence(); }
378 : : template<typename S> static void setWant(S&& s) { s.setWantSequence(true); }
379 : : template<typename S> static bool getHas(S&& s) { return s.getHasSequence(); }
380 : : template<typename S> static void setHas(S&& s) { s.setHasSequence(true); }
381 : : };
382 : : struct ScriptSigPrefix
383 : : {
384 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getScriptSigPrefix()) { return s.getScriptSigPrefix(); }
385 : : template<typename S> static bool has(S&& s) { return s.hasScriptSigPrefix(); }
386 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setScriptSigPrefix(std::forward<A>(a)); }
387 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initScriptSigPrefix(std::forward<A>(a)...); }
388 : : template<typename S> static bool getWant(S&& s) { return s.getWantScriptSigPrefix(); }
389 : : template<typename S> static void setWant(S&& s) { s.setWantScriptSigPrefix(true); }
390 : : template<typename S> static bool getHas(S&& s) { return s.getHasScriptSigPrefix(); }
391 : : template<typename S> static void setHas(S&& s) { s.setHasScriptSigPrefix(true); }
392 : : };
393 : : struct Witness
394 : : {
395 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getWitness()) { return s.getWitness(); }
396 : 0 : template<typename S> static bool has(S&& s) { return s.hasWitness(); }
397 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setWitness(std::forward<A>(a)); }
398 [ # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initWitness(std::forward<A>(a)...); }
399 : : template<typename S> static bool getWant(S&& s) { return s.getWantWitness(); }
400 : : template<typename S> static void setWant(S&& s) { s.setWantWitness(true); }
401 : : template<typename S> static bool getHas(S&& s) { return s.getHasWitness(); }
402 : : template<typename S> static void setHas(S&& s) { s.setHasWitness(true); }
403 : : };
404 : : struct BlockRewardRemaining
405 : : {
406 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getBlockRewardRemaining()) { return s.getBlockRewardRemaining(); }
407 : : template<typename S> static bool has(S&& s) { return s.hasBlockRewardRemaining(); }
408 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setBlockRewardRemaining(std::forward<A>(a)); }
409 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initBlockRewardRemaining(std::forward<A>(a)...); }
410 : : template<typename S> static bool getWant(S&& s) { return s.getWantBlockRewardRemaining(); }
411 : : template<typename S> static void setWant(S&& s) { s.setWantBlockRewardRemaining(true); }
412 : : template<typename S> static bool getHas(S&& s) { return s.getHasBlockRewardRemaining(); }
413 : : template<typename S> static void setHas(S&& s) { s.setHasBlockRewardRemaining(true); }
414 : : };
415 : : struct RequiredOutputs
416 : : {
417 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getRequiredOutputs()) { return s.getRequiredOutputs(); }
418 : : template<typename S> static bool has(S&& s) { return s.hasRequiredOutputs(); }
419 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setRequiredOutputs(std::forward<A>(a)); }
420 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initRequiredOutputs(std::forward<A>(a)...); }
421 : : template<typename S> static bool getWant(S&& s) { return s.getWantRequiredOutputs(); }
422 : : template<typename S> static void setWant(S&& s) { s.setWantRequiredOutputs(true); }
423 : : template<typename S> static bool getHas(S&& s) { return s.getHasRequiredOutputs(); }
424 : : template<typename S> static void setHas(S&& s) { s.setHasRequiredOutputs(true); }
425 : : };
426 : : struct LockTime
427 : : {
428 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getLockTime()) { return s.getLockTime(); }
429 : : template<typename S> static bool has(S&& s) { return s.hasLockTime(); }
430 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setLockTime(std::forward<A>(a)); }
431 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initLockTime(std::forward<A>(a)...); }
432 : : template<typename S> static bool getWant(S&& s) { return s.getWantLockTime(); }
433 : : template<typename S> static void setWant(S&& s) { s.setWantLockTime(true); }
434 : : template<typename S> static bool getHas(S&& s) { return s.getHasLockTime(); }
435 : : template<typename S> static void setHas(S&& s) { s.setHasLockTime(true); }
436 : : };
437 : : } // namespace mining_fields
438 : :
439 : : template<>
440 : : struct ProxyClient<ipc::capnp::messages::Mining> final : public ProxyClientCustom<ipc::capnp::messages::Mining, interfaces::Mining>
441 : : {
442 : : public:
443 [ # # # # ]: 0 : using ProxyClientCustom::ProxyClientCustom;
444 : : ~ProxyClient();
445 : : using M0 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::IsTestChainParams>;
446 : : typename M0::Result isTestChain();
447 : : using M1 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::IsInitialBlockDownloadParams>;
448 : : typename M1::Result isInitialBlockDownload();
449 : : using M2 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::GetTipParams>;
450 : : typename M2::Result getTip();
451 : : using M3 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::WaitTipChangedParams>;
452 : : typename M3::Result waitTipChanged(M3::Param<0> currentTip,M3::Param<1> timeout);
453 : : using M4 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::CreateNewBlockParams>;
454 : : typename M4::Result createNewBlock(M4::Param<0> options,M4::Param<1> cooldown);
455 : : using M5 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::CheckBlockParams>;
456 : : typename M5::Result checkBlock(M5::Param<0> block,M5::Param<1> options,M5::Param<2> reason,M5::Param<3> debug);
457 : : using M6 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::InterruptParams>;
458 : : typename M6::Result interrupt();
459 : : using M7 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::SubmitBlockParams>;
460 : : typename M7::Result submitBlock(M7::Param<0> block,M7::Param<1> reason,M7::Param<2> debug);
461 : : using M8 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::GetTransactionsByTxIDParams>;
462 : : typename M8::Result getTransactionsByTxID(M8::Param<0> txids);
463 : : using M9 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::GetTransactionsByWitnessIDParams>;
464 : : typename M9::Result getTransactionsByWitnessID(M9::Param<0> wtxids);
465 : : };
466 : :
467 : : template<>
468 : : struct ProxyServer<ipc::capnp::messages::Mining> : public ProxyServerCustom<ipc::capnp::messages::Mining, interfaces::Mining>
469 : : {
470 : : public:
471 : : using ProxyServerCustom::ProxyServerCustom;
472 : : ~ProxyServer();
473 : : kj::Promise<void> isTestChain(IsTestChainContext call_context) override;
474 : : kj::Promise<void> isInitialBlockDownload(IsInitialBlockDownloadContext call_context) override;
475 : : kj::Promise<void> getTip(GetTipContext call_context) override;
476 : : kj::Promise<void> waitTipChanged(WaitTipChangedContext call_context) override;
477 : : kj::Promise<void> createNewBlock(CreateNewBlockContext call_context) override;
478 : : kj::Promise<void> checkBlock(CheckBlockContext call_context) override;
479 : : kj::Promise<void> interrupt(InterruptContext call_context) override;
480 : : kj::Promise<void> submitBlock(SubmitBlockContext call_context) override;
481 : : kj::Promise<void> getTransactionsByTxID(GetTransactionsByTxIDContext call_context) override;
482 : : kj::Promise<void> getTransactionsByWitnessID(GetTransactionsByWitnessIDContext call_context) override;
483 : : };
484 : :
485 : : template<>
486 : : struct ProxyType<interfaces::Mining>
487 : : {
488 : : using Type = interfaces::Mining;
489 : : using Message = ipc::capnp::messages::Mining;
490 : : using Client = ProxyClient<Message>;
491 : : using Server = ProxyServer<Message>;
492 : : };
493 : :
494 : : template<>
495 : : struct ProxyClient<ipc::capnp::messages::BlockTemplate> final : public ProxyClientCustom<ipc::capnp::messages::BlockTemplate, interfaces::BlockTemplate>
496 : : {
497 : : public:
498 [ # # # # ]: 0 : using ProxyClientCustom::ProxyClientCustom;
499 : : ~ProxyClient();
500 : : using M0 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::DestroyParams>;
501 : : static typename M0::Result destroy(Super& super);
502 : : using M1 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetBlockHeaderParams>;
503 : : typename M1::Result getBlockHeader();
504 : : using M2 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetBlockParams>;
505 : : typename M2::Result getBlock();
506 : : using M3 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetTxFeesParams>;
507 : : typename M3::Result getTxFees();
508 : : using M4 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetTxSigopsParams>;
509 : : typename M4::Result getTxSigops();
510 : : using M5 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetCoinbaseTxParams>;
511 : : typename M5::Result getCoinbaseTx();
512 : : using M6 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetCoinbaseMerklePathParams>;
513 : : typename M6::Result getCoinbaseMerklePath();
514 : : using M7 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::SubmitSolutionOld7Params>;
515 : : typename M7::Result submitSolutionOld7(M7::Param<0> version,M7::Param<1> timestamp,M7::Param<2> nonce,M7::Param<3> coinbase);
516 : : using M8 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::WaitNextParams>;
517 : : typename M8::Result waitNext(M8::Param<0> options);
518 : : using M9 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::InterruptWaitParams>;
519 : : typename M9::Result interruptWait();
520 : : using M10 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::SubmitSolutionParams>;
521 : : typename M10::Result submitSolution(M10::Param<0> version,M10::Param<1> timestamp,M10::Param<2> nonce,M10::Param<3> coinbase,M10::Param<4> reason,M10::Param<5> debug);
522 : : };
523 : :
524 : : template<>
525 : : struct ProxyServer<ipc::capnp::messages::BlockTemplate> : public ProxyServerCustom<ipc::capnp::messages::BlockTemplate, interfaces::BlockTemplate>
526 : : {
527 : : public:
528 : : using ProxyServerCustom::ProxyServerCustom;
529 : : ~ProxyServer();
530 : : kj::Promise<void> destroy(DestroyContext call_context) override;
531 : : kj::Promise<void> getBlockHeader(GetBlockHeaderContext call_context) override;
532 : : kj::Promise<void> getBlock(GetBlockContext call_context) override;
533 : : kj::Promise<void> getTxFees(GetTxFeesContext call_context) override;
534 : : kj::Promise<void> getTxSigops(GetTxSigopsContext call_context) override;
535 : : kj::Promise<void> getCoinbaseTx(GetCoinbaseTxContext call_context) override;
536 : : kj::Promise<void> getCoinbaseMerklePath(GetCoinbaseMerklePathContext call_context) override;
537 : : kj::Promise<void> submitSolutionOld7(SubmitSolutionOld7Context call_context) override;
538 : : kj::Promise<void> waitNext(WaitNextContext call_context) override;
539 : : kj::Promise<void> interruptWait(InterruptWaitContext call_context) override;
540 : : kj::Promise<void> submitSolution(SubmitSolutionContext call_context) override;
541 : : };
542 : :
543 : : template<>
544 : : struct ProxyType<interfaces::BlockTemplate>
545 : : {
546 : : using Type = interfaces::BlockTemplate;
547 : : using Message = ipc::capnp::messages::BlockTemplate;
548 : : using Client = ProxyClient<Message>;
549 : : using Server = ProxyServer<Message>;
550 : : };
551 : : template<>
552 : : struct ProxyStruct<ipc::capnp::messages::BlockCreateOptions>
553 : : {
554 : : using Struct = ipc::capnp::messages::BlockCreateOptions;
555 : : using UseMempoolAccessor = Accessor<mining_fields::UseMempool, FIELD_IN | FIELD_OUT>;
556 : : using BlockReservedWeightAccessor = Accessor<mining_fields::BlockReservedWeight, FIELD_IN | FIELD_OUT>;
557 : : using CoinbaseOutputMaxAdditionalSigopsAccessor = Accessor<mining_fields::CoinbaseOutputMaxAdditionalSigops, FIELD_IN | FIELD_OUT>;
558 : : using Accessors = std::tuple<UseMempoolAccessor, BlockReservedWeightAccessor, CoinbaseOutputMaxAdditionalSigopsAccessor>;
559 : : static constexpr size_t fields = 3;
560 : : };
561 : : template<>
562 : : struct ProxyStruct<ipc::capnp::messages::BlockWaitOptions>
563 : : {
564 : : using Struct = ipc::capnp::messages::BlockWaitOptions;
565 : : using TimeoutAccessor = Accessor<mining_fields::Timeout, FIELD_IN | FIELD_OUT>;
566 : : using FeeThresholdAccessor = Accessor<mining_fields::FeeThreshold, FIELD_IN | FIELD_OUT>;
567 : : using Accessors = std::tuple<TimeoutAccessor, FeeThresholdAccessor>;
568 : : static constexpr size_t fields = 2;
569 : : };
570 : : template<>
571 : : struct ProxyStruct<ipc::capnp::messages::BlockCheckOptions>
572 : : {
573 : : using Struct = ipc::capnp::messages::BlockCheckOptions;
574 : : using CheckMerkleRootAccessor = Accessor<mining_fields::CheckMerkleRoot, FIELD_IN | FIELD_OUT>;
575 : : using CheckPowAccessor = Accessor<mining_fields::CheckPow, FIELD_IN | FIELD_OUT>;
576 : : using Accessors = std::tuple<CheckMerkleRootAccessor, CheckPowAccessor>;
577 : : static constexpr size_t fields = 2;
578 : : };
579 : : template<>
580 : : struct ProxyStruct<ipc::capnp::messages::CoinbaseTx>
581 : : {
582 : : using Struct = ipc::capnp::messages::CoinbaseTx;
583 : : using VersionAccessor = Accessor<mining_fields::Version, FIELD_IN | FIELD_OUT>;
584 : : using SequenceAccessor = Accessor<mining_fields::Sequence, FIELD_IN | FIELD_OUT>;
585 : : using ScriptSigPrefixAccessor = Accessor<mining_fields::ScriptSigPrefix, FIELD_IN | FIELD_OUT | FIELD_BOXED>;
586 : : using WitnessAccessor = Accessor<mining_fields::Witness, FIELD_IN | FIELD_OUT | FIELD_BOXED>;
587 : : using BlockRewardRemainingAccessor = Accessor<mining_fields::BlockRewardRemaining, FIELD_IN | FIELD_OUT>;
588 : : using RequiredOutputsAccessor = Accessor<mining_fields::RequiredOutputs, FIELD_IN | FIELD_OUT | FIELD_BOXED>;
589 : : using LockTimeAccessor = Accessor<mining_fields::LockTime, FIELD_IN | FIELD_OUT>;
590 : : using Accessors = std::tuple<VersionAccessor, SequenceAccessor, ScriptSigPrefixAccessor, WitnessAccessor, BlockRewardRemainingAccessor, RequiredOutputsAccessor, LockTimeAccessor>;
591 : : static constexpr size_t fields = 7;
592 : : };
593 : : } // namespace mp
594 : : #if defined(__GNUC__)
595 : : #pragma GCC diagnostic pop
596 : : #endif
597 : : #endif
|