MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetAccountDestination

Function GetAccountDestination

src/rpcwallet.cpp:357–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356
357CTxDestination GetAccountDestination(CWallet* const pwallet, std::string strAccount, bool bForceNew=false)
358{
359 CPubKey pubKey;
360 if (!pwalletMain->GetAccountPubkey(pubKey, strAccount, bForceNew)) {
361 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
362 }
363
364 CTxDestination dest;
365 if (!pwallet->GetAccountDestination(dest, strAccount, bForceNew)) {
366 throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
367 }
368
369 return dest;
370}
371
372UniValue getaccountaddress(const UniValue& params, bool fHelp)
373{

Callers 2

getaccountaddressFunction · 0.85
setaccountFunction · 0.85

Calls 3

JSONRPCErrorFunction · 0.85
GetAccountPubkeyMethod · 0.80
GetAccountDestinationMethod · 0.80

Tested by

no test coverage detected