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