LCOV - code coverage report
Current view: top level - bld-cov/src/ipc/capnp - mining.capnp.proxy.h (source / functions) Coverage Total Hit
Test: total_coverage.info Lines: 0.0 % 60 0
Test Date: 2026-02-25 05:45:00 Functions: 0.0 % 2 0
Branches: 0.0 % 84 0

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

Generated by: LCOV version 2.0-1