MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / GetStakeAction

Function GetStakeAction

src/rpc/rpcscoin.cpp:118–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116namespace 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
132Value submitcoinstaketx(const Array& params, bool fHelp) {

Callers 1

submitcoinstaketxFunction · 0.85

Calls 5

StrToUpperFunction · 0.85
JSONRPCErrorFunction · 0.85
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected