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