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 <src/ipc/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::GetCoinbaseTxParams>
81 : : {
82 : : static constexpr auto impl = &interfaces::BlockTemplate::getCoinbaseTx;
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 : : 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 Block
178 : : {
179 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getBlock()) { return s.getBlock(); }
180 : 0 : template<typename S> static bool has(S&& s) { return s.hasBlock(); }
181 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setBlock(std::forward<A>(a)); }
182 [ # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initBlock(std::forward<A>(a)...); }
183 : : template<typename S> static bool getWant(S&& s) { return s.getWantBlock(); }
184 : : template<typename S> static void setWant(S&& s) { s.setWantBlock(true); }
185 : : template<typename S> static bool getHas(S&& s) { return s.getHasBlock(); }
186 : : template<typename S> static void setHas(S&& s) { s.setHasBlock(true); }
187 : : };
188 : : struct Reason
189 : : {
190 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getReason()) { return s.getReason(); }
191 : : template<typename S> static bool has(S&& s) { return s.hasReason(); }
192 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setReason(std::forward<A>(a)); }
193 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initReason(std::forward<A>(a)...); }
194 : : template<typename S> static bool getWant(S&& s) { return s.getWantReason(); }
195 : : template<typename S> static void setWant(S&& s) { s.setWantReason(true); }
196 : : template<typename S> static bool getHas(S&& s) { return s.getHasReason(); }
197 : : template<typename S> static void setHas(S&& s) { s.setHasReason(true); }
198 : : };
199 : : struct Debug
200 : : {
201 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getDebug()) { return s.getDebug(); }
202 : : template<typename S> static bool has(S&& s) { return s.hasDebug(); }
203 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setDebug(std::forward<A>(a)); }
204 : 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initDebug(std::forward<A>(a)...); }
205 : : template<typename S> static bool getWant(S&& s) { return s.getWantDebug(); }
206 : : template<typename S> static void setWant(S&& s) { s.setWantDebug(true); }
207 : : template<typename S> static bool getHas(S&& s) { return s.getHasDebug(); }
208 : : template<typename S> static void setHas(S&& s) { s.setHasDebug(true); }
209 : : };
210 : : struct Version
211 : : {
212 [ # # # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getVersion()) { return s.getVersion(); }
213 : : template<typename S> static bool has(S&& s) { return s.hasVersion(); }
214 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setVersion(std::forward<A>(a)); }
215 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initVersion(std::forward<A>(a)...); }
216 : : template<typename S> static bool getWant(S&& s) { return s.getWantVersion(); }
217 : : template<typename S> static void setWant(S&& s) { s.setWantVersion(true); }
218 : : template<typename S> static bool getHas(S&& s) { return s.getHasVersion(); }
219 : : template<typename S> static void setHas(S&& s) { s.setHasVersion(true); }
220 : : };
221 : : struct Timestamp
222 : : {
223 [ # # # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getTimestamp()) { return s.getTimestamp(); }
224 : : template<typename S> static bool has(S&& s) { return s.hasTimestamp(); }
225 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setTimestamp(std::forward<A>(a)); }
226 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initTimestamp(std::forward<A>(a)...); }
227 : : template<typename S> static bool getWant(S&& s) { return s.getWantTimestamp(); }
228 : : template<typename S> static void setWant(S&& s) { s.setWantTimestamp(true); }
229 : : template<typename S> static bool getHas(S&& s) { return s.getHasTimestamp(); }
230 : : template<typename S> static void setHas(S&& s) { s.setHasTimestamp(true); }
231 : : };
232 : : struct Nonce
233 : : {
234 [ # # # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getNonce()) { return s.getNonce(); }
235 : : template<typename S> static bool has(S&& s) { return s.hasNonce(); }
236 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setNonce(std::forward<A>(a)); }
237 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initNonce(std::forward<A>(a)...); }
238 : : template<typename S> static bool getWant(S&& s) { return s.getWantNonce(); }
239 : : template<typename S> static void setWant(S&& s) { s.setWantNonce(true); }
240 : : template<typename S> static bool getHas(S&& s) { return s.getHasNonce(); }
241 : : template<typename S> static void setHas(S&& s) { s.setHasNonce(true); }
242 : : };
243 : : struct Coinbase
244 : : {
245 : 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCoinbase()) { return s.getCoinbase(); }
246 : 0 : template<typename S> static bool has(S&& s) { return s.hasCoinbase(); }
247 : : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCoinbase(std::forward<A>(a)); }
248 [ # # ]: 0 : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCoinbase(std::forward<A>(a)...); }
249 : : template<typename S> static bool getWant(S&& s) { return s.getWantCoinbase(); }
250 : : template<typename S> static void setWant(S&& s) { s.setWantCoinbase(true); }
251 : : template<typename S> static bool getHas(S&& s) { return s.getHasCoinbase(); }
252 : : template<typename S> static void setHas(S&& s) { s.setHasCoinbase(true); }
253 : : };
254 : : struct UseMempool
255 : : {
256 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getUseMempool()) { return s.getUseMempool(); }
257 : : template<typename S> static bool has(S&& s) { return s.hasUseMempool(); }
258 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setUseMempool(std::forward<A>(a)); }
259 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initUseMempool(std::forward<A>(a)...); }
260 : : template<typename S> static bool getWant(S&& s) { return s.getWantUseMempool(); }
261 : : template<typename S> static void setWant(S&& s) { s.setWantUseMempool(true); }
262 : : template<typename S> static bool getHas(S&& s) { return s.getHasUseMempool(); }
263 : : template<typename S> static void setHas(S&& s) { s.setHasUseMempool(true); }
264 : : };
265 : : struct BlockReservedWeight
266 : : {
267 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getBlockReservedWeight()) { return s.getBlockReservedWeight(); }
268 : : template<typename S> static bool has(S&& s) { return s.hasBlockReservedWeight(); }
269 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setBlockReservedWeight(std::forward<A>(a)); }
270 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initBlockReservedWeight(std::forward<A>(a)...); }
271 : : template<typename S> static bool getWant(S&& s) { return s.getWantBlockReservedWeight(); }
272 : : template<typename S> static void setWant(S&& s) { s.setWantBlockReservedWeight(true); }
273 : : template<typename S> static bool getHas(S&& s) { return s.getHasBlockReservedWeight(); }
274 : : template<typename S> static void setHas(S&& s) { s.setHasBlockReservedWeight(true); }
275 : : };
276 : : struct CoinbaseOutputMaxAdditionalSigops
277 : : {
278 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCoinbaseOutputMaxAdditionalSigops()) { return s.getCoinbaseOutputMaxAdditionalSigops(); }
279 : : template<typename S> static bool has(S&& s) { return s.hasCoinbaseOutputMaxAdditionalSigops(); }
280 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCoinbaseOutputMaxAdditionalSigops(std::forward<A>(a)); }
281 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCoinbaseOutputMaxAdditionalSigops(std::forward<A>(a)...); }
282 : : template<typename S> static bool getWant(S&& s) { return s.getWantCoinbaseOutputMaxAdditionalSigops(); }
283 : : template<typename S> static void setWant(S&& s) { s.setWantCoinbaseOutputMaxAdditionalSigops(true); }
284 : : template<typename S> static bool getHas(S&& s) { return s.getHasCoinbaseOutputMaxAdditionalSigops(); }
285 : : template<typename S> static void setHas(S&& s) { s.setHasCoinbaseOutputMaxAdditionalSigops(true); }
286 : : };
287 : : struct FeeThreshold
288 : : {
289 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getFeeThreshold()) { return s.getFeeThreshold(); }
290 : : template<typename S> static bool has(S&& s) { return s.hasFeeThreshold(); }
291 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setFeeThreshold(std::forward<A>(a)); }
292 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initFeeThreshold(std::forward<A>(a)...); }
293 : : template<typename S> static bool getWant(S&& s) { return s.getWantFeeThreshold(); }
294 : : template<typename S> static void setWant(S&& s) { s.setWantFeeThreshold(true); }
295 : : template<typename S> static bool getHas(S&& s) { return s.getHasFeeThreshold(); }
296 : : template<typename S> static void setHas(S&& s) { s.setHasFeeThreshold(true); }
297 : : };
298 : : struct CheckMerkleRoot
299 : : {
300 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCheckMerkleRoot()) { return s.getCheckMerkleRoot(); }
301 : : template<typename S> static bool has(S&& s) { return s.hasCheckMerkleRoot(); }
302 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCheckMerkleRoot(std::forward<A>(a)); }
303 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCheckMerkleRoot(std::forward<A>(a)...); }
304 : : template<typename S> static bool getWant(S&& s) { return s.getWantCheckMerkleRoot(); }
305 : : template<typename S> static void setWant(S&& s) { s.setWantCheckMerkleRoot(true); }
306 : : template<typename S> static bool getHas(S&& s) { return s.getHasCheckMerkleRoot(); }
307 : : template<typename S> static void setHas(S&& s) { s.setHasCheckMerkleRoot(true); }
308 : : };
309 : : struct CheckPow
310 : : {
311 [ # # ]: 0 : template<typename S> static auto get(S&& s) -> decltype(s.getCheckPow()) { return s.getCheckPow(); }
312 : : template<typename S> static bool has(S&& s) { return s.hasCheckPow(); }
313 : 0 : template<typename S, typename A> static void set(S&& s, A&& a) { s.setCheckPow(std::forward<A>(a)); }
314 : : template<typename S, typename... A> static decltype(auto) init(S&& s, A&&... a) { return s.initCheckPow(std::forward<A>(a)...); }
315 : : template<typename S> static bool getWant(S&& s) { return s.getWantCheckPow(); }
316 : : template<typename S> static void setWant(S&& s) { s.setWantCheckPow(true); }
317 : : template<typename S> static bool getHas(S&& s) { return s.getHasCheckPow(); }
318 : : template<typename S> static void setHas(S&& s) { s.setHasCheckPow(true); }
319 : : };
320 : : } // namespace mining_fields
321 : :
322 : : template<>
323 : : struct ProxyClient<ipc::capnp::messages::Mining> final : public ProxyClientCustom<ipc::capnp::messages::Mining, interfaces::Mining>
324 : : {
325 : : public:
326 [ # # # # ]: 0 : using ProxyClientCustom::ProxyClientCustom;
327 : : ~ProxyClient();
328 : : using M0 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::IsTestChainParams>;
329 : : typename M0::Result isTestChain();
330 : : using M1 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::IsInitialBlockDownloadParams>;
331 : : typename M1::Result isInitialBlockDownload();
332 : : using M2 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::GetTipParams>;
333 : : typename M2::Result getTip();
334 : : using M3 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::WaitTipChangedParams>;
335 : : typename M3::Result waitTipChanged(M3::Param<0> currentTip,M3::Param<1> timeout);
336 : : using M4 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::CreateNewBlockParams>;
337 : : typename M4::Result createNewBlock(M4::Param<0> options);
338 : : using M5 = ProxyClientMethodTraits<ipc::capnp::messages::Mining::CheckBlockParams>;
339 : : typename M5::Result checkBlock(M5::Param<0> block,M5::Param<1> options,M5::Param<2> reason,M5::Param<3> debug);
340 : : };
341 : :
342 : : template<>
343 : : struct ProxyServer<ipc::capnp::messages::Mining> : public ProxyServerCustom<ipc::capnp::messages::Mining, interfaces::Mining>
344 : : {
345 : : public:
346 : : using ProxyServerCustom::ProxyServerCustom;
347 : : ~ProxyServer();
348 : : kj::Promise<void> isTestChain(IsTestChainContext call_context) override;
349 : : kj::Promise<void> isInitialBlockDownload(IsInitialBlockDownloadContext call_context) override;
350 : : kj::Promise<void> getTip(GetTipContext call_context) override;
351 : : kj::Promise<void> waitTipChanged(WaitTipChangedContext call_context) override;
352 : : kj::Promise<void> createNewBlock(CreateNewBlockContext call_context) override;
353 : : kj::Promise<void> checkBlock(CheckBlockContext call_context) override;
354 : : };
355 : :
356 : : template<>
357 : : struct ProxyType<interfaces::Mining>
358 : : {
359 : : using Type = interfaces::Mining;
360 : : using Message = ipc::capnp::messages::Mining;
361 : : using Client = ProxyClient<Message>;
362 : : using Server = ProxyServer<Message>;
363 : : };
364 : :
365 : : template<>
366 : : struct ProxyClient<ipc::capnp::messages::BlockTemplate> final : public ProxyClientCustom<ipc::capnp::messages::BlockTemplate, interfaces::BlockTemplate>
367 : : {
368 : : public:
369 [ # # # # ]: 0 : using ProxyClientCustom::ProxyClientCustom;
370 : : ~ProxyClient();
371 : : using M0 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::DestroyParams>;
372 : : static typename M0::Result destroy(Super& super);
373 : : using M1 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetBlockHeaderParams>;
374 : : typename M1::Result getBlockHeader();
375 : : using M2 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetBlockParams>;
376 : : typename M2::Result getBlock();
377 : : using M3 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetTxFeesParams>;
378 : : typename M3::Result getTxFees();
379 : : using M4 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetTxSigopsParams>;
380 : : typename M4::Result getTxSigops();
381 : : using M5 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetCoinbaseTxParams>;
382 : : typename M5::Result getCoinbaseTx();
383 : : using M6 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetCoinbaseCommitmentParams>;
384 : : typename M6::Result getCoinbaseCommitment();
385 : : using M7 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetWitnessCommitmentIndexParams>;
386 : : typename M7::Result getWitnessCommitmentIndex();
387 : : using M8 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::GetCoinbaseMerklePathParams>;
388 : : typename M8::Result getCoinbaseMerklePath();
389 : : using M9 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::SubmitSolutionParams>;
390 : : typename M9::Result submitSolution(M9::Param<0> version,M9::Param<1> timestamp,M9::Param<2> nonce,M9::Param<3> coinbase);
391 : : using M10 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::WaitNextParams>;
392 : : typename M10::Result waitNext(M10::Param<0> options);
393 : : using M11 = ProxyClientMethodTraits<ipc::capnp::messages::BlockTemplate::InterruptWaitParams>;
394 : : typename M11::Result interruptWait();
395 : : };
396 : :
397 : : template<>
398 : : struct ProxyServer<ipc::capnp::messages::BlockTemplate> : public ProxyServerCustom<ipc::capnp::messages::BlockTemplate, interfaces::BlockTemplate>
399 : : {
400 : : public:
401 : : using ProxyServerCustom::ProxyServerCustom;
402 : : ~ProxyServer();
403 : : kj::Promise<void> destroy(DestroyContext call_context) override;
404 : : kj::Promise<void> getBlockHeader(GetBlockHeaderContext call_context) override;
405 : : kj::Promise<void> getBlock(GetBlockContext call_context) override;
406 : : kj::Promise<void> getTxFees(GetTxFeesContext call_context) override;
407 : : kj::Promise<void> getTxSigops(GetTxSigopsContext call_context) override;
408 : : kj::Promise<void> getCoinbaseTx(GetCoinbaseTxContext call_context) override;
409 : : kj::Promise<void> getCoinbaseCommitment(GetCoinbaseCommitmentContext call_context) override;
410 : : kj::Promise<void> getWitnessCommitmentIndex(GetWitnessCommitmentIndexContext call_context) override;
411 : : kj::Promise<void> getCoinbaseMerklePath(GetCoinbaseMerklePathContext call_context) override;
412 : : kj::Promise<void> submitSolution(SubmitSolutionContext call_context) override;
413 : : kj::Promise<void> waitNext(WaitNextContext call_context) override;
414 : : kj::Promise<void> interruptWait(InterruptWaitContext call_context) override;
415 : : };
416 : :
417 : : template<>
418 : : struct ProxyType<interfaces::BlockTemplate>
419 : : {
420 : : using Type = interfaces::BlockTemplate;
421 : : using Message = ipc::capnp::messages::BlockTemplate;
422 : : using Client = ProxyClient<Message>;
423 : : using Server = ProxyServer<Message>;
424 : : };
425 : : template<>
426 : : struct ProxyStruct<ipc::capnp::messages::BlockCreateOptions>
427 : : {
428 : : using Struct = ipc::capnp::messages::BlockCreateOptions;
429 : : using UseMempoolAccessor = Accessor<mining_fields::UseMempool, FIELD_IN | FIELD_OUT>;
430 : : using BlockReservedWeightAccessor = Accessor<mining_fields::BlockReservedWeight, FIELD_IN | FIELD_OUT>;
431 : : using CoinbaseOutputMaxAdditionalSigopsAccessor = Accessor<mining_fields::CoinbaseOutputMaxAdditionalSigops, FIELD_IN | FIELD_OUT>;
432 : : using Accessors = std::tuple<UseMempoolAccessor, BlockReservedWeightAccessor, CoinbaseOutputMaxAdditionalSigopsAccessor>;
433 : : static constexpr size_t fields = 3;
434 : : };
435 : : template<>
436 : : struct ProxyStruct<ipc::capnp::messages::BlockWaitOptions>
437 : : {
438 : : using Struct = ipc::capnp::messages::BlockWaitOptions;
439 : : using TimeoutAccessor = Accessor<mining_fields::Timeout, FIELD_IN | FIELD_OUT>;
440 : : using FeeThresholdAccessor = Accessor<mining_fields::FeeThreshold, FIELD_IN | FIELD_OUT>;
441 : : using Accessors = std::tuple<TimeoutAccessor, FeeThresholdAccessor>;
442 : : static constexpr size_t fields = 2;
443 : : };
444 : : template<>
445 : : struct ProxyStruct<ipc::capnp::messages::BlockCheckOptions>
446 : : {
447 : : using Struct = ipc::capnp::messages::BlockCheckOptions;
448 : : using CheckMerkleRootAccessor = Accessor<mining_fields::CheckMerkleRoot, FIELD_IN | FIELD_OUT>;
449 : : using CheckPowAccessor = Accessor<mining_fields::CheckPow, FIELD_IN | FIELD_OUT>;
450 : : using Accessors = std::tuple<CheckMerkleRootAccessor, CheckPowAccessor>;
451 : : static constexpr size_t fields = 2;
452 : : };
453 : : } // namespace mp
454 : : #if defined(__GNUC__)
455 : : #pragma GCC diagnostic pop
456 : : #endif
457 : : #endif
|