src/wallet/rpcwallet.cpp
從JSONRPCRequest當(dāng)前URI(字符串)里面獲得攜帶的wallet_name參數(shù),賦值到wallet_name
static const std::string WALLET_ENDPOINT_BASE = "/wallet/";
bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& wallet_name)
{
if (request.URI.substr(0, WALLET_ENDPOINT_BASE.size()) == WALLET_ENDPOINT_BASE) {
// wallet endpoint was used
wallet_name = urlDecode(request.URI.substr(WALLET_ENDPOINT_BASE.size()));
return true;
}
return false;
}