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