| 116 | namespace RPC_PARAM { |
| 117 | |
| 118 | BalanceOpType GetStakeAction(const Array& params, const size_t index) { |
| 119 | if (params.size() > index) { |
| 120 | string actionStr = StrToUpper(params[index].get_str()); |
| 121 | auto it = STAKE_COINS_ACTIONS.find(actionStr); |
| 122 | if (it == STAKE_COINS_ACTIONS.end()) |
| 123 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid action=%s", params[index].get_str())); |
| 124 | |
| 125 | return it->second; |
| 126 | } |
| 127 | |
| 128 | return BalanceOpType::STAKE; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | Value submitcoinstaketx(const Array& params, bool fHelp) { |
no test coverage detected