Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 731 Lines • ▼ Show 20 Lines | static UniValue signmessage(const Config &config, | ||||
ss << strMessageMagic; | ss << strMessageMagic; | ||||
ss << strMessage; | ss << strMessage; | ||||
std::vector<uint8_t> vchSig; | std::vector<uint8_t> vchSig; | ||||
if (!key.SignCompact(ss.GetHash(), vchSig)) { | if (!key.SignCompact(ss.GetHash(), vchSig)) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed"); | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed"); | ||||
} | } | ||||
return EncodeBase64(&vchSig[0], vchSig.size()); | return EncodeBase64(vchSig.data(), vchSig.size()); | ||||
} | } | ||||
static UniValue getreceivedbyaddress(const Config &config, | static UniValue getreceivedbyaddress(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,552 Lines • Show Last 20 Lines |