Create a simulated `getinfo` request. */
| 273 | |
| 274 | /** Create a simulated `getinfo` request. */ |
| 275 | UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) override |
| 276 | { |
| 277 | if (!args.empty()) { |
| 278 | throw std::runtime_error("-getinfo takes no arguments"); |
| 279 | } |
| 280 | UniValue result(UniValue::VARR); |
| 281 | result.push_back(JSONRPCRequestObj("getnetworkinfo", NullUniValue, ID_NETWORKINFO)); |
| 282 | result.push_back(JSONRPCRequestObj("getblockchaininfo", NullUniValue, ID_BLOCKCHAININFO)); |
| 283 | result.push_back(JSONRPCRequestObj("getwalletinfo", NullUniValue, ID_WALLETINFO)); |
| 284 | return result; |
| 285 | } |
| 286 | |
| 287 | /** Collect values from the batch and form a simulated `getinfo` reply. */ |
| 288 | UniValue ProcessReply(const UniValue &batch_in) override |
no test coverage detected