Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/client.cpp
Show All 14 Lines | |||||
class CRPCConvertParam { | class CRPCConvertParam { | ||||
public: | public: | ||||
std::string methodName; //!< method whose params want conversion | std::string methodName; //!< method whose params want conversion | ||||
int paramIdx; //!< 0-based idx of param to convert | int paramIdx; //!< 0-based idx of param to convert | ||||
std::string paramName; //!< parameter name | std::string paramName; //!< parameter name | ||||
}; | }; | ||||
/** | /** | ||||
* Specifiy a (method, idx, name) here if the argument is a non-string RPC | * Specify a (method, idx, name) here if the argument is a non-string RPC | ||||
* argument and needs to be converted from JSON. | * argument and needs to be converted from JSON. | ||||
* | * | ||||
* @note Parameter indexes start from 0. | * @note Parameter indexes start from 0. | ||||
*/ | */ | ||||
static const CRPCConvertParam vRPCConvertParams[] = { | static const CRPCConvertParam vRPCConvertParams[] = { | ||||
{"setmocktime", 0, "timestamp"}, | {"setmocktime", 0, "timestamp"}, | ||||
{"generate", 0, "nblocks"}, | {"generate", 0, "nblocks"}, | ||||
{"generate", 1, "maxtries"}, | {"generate", 1, "maxtries"}, | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |