Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 279 Lines • ▼ Show 20 Lines | static UniValue getrawchangeaddress(const Config &config, | ||||
} | } | ||||
LOCK2(cs_main, pwallet->cs_wallet); | LOCK2(cs_main, pwallet->cs_wallet); | ||||
if (!pwallet->IsLocked()) { | if (!pwallet->IsLocked()) { | ||||
pwallet->TopUpKeyPool(); | pwallet->TopUpKeyPool(); | ||||
} | } | ||||
OutputType output_type = g_change_type; | OutputType output_type = | ||||
g_change_type != OutputType::NONE ? g_change_type : g_address_type; | |||||
if (!request.params[0].isNull()) { | if (!request.params[0].isNull()) { | ||||
output_type = | output_type = ParseOutputType(request.params[0].get_str(), output_type); | ||||
ParseOutputType(request.params[0].get_str(), g_change_type); | |||||
if (output_type == OutputType::NONE) { | if (output_type == OutputType::NONE) { | ||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, | ||||
strprintf("Unknown address type '%s'", | strprintf("Unknown address type '%s'", | ||||
request.params[0].get_str())); | request.params[0].get_str())); | ||||
} | } | ||||
} | } | ||||
CReserveKey reservekey(pwallet); | CReserveKey reservekey(pwallet); | ||||
▲ Show 20 Lines • Show All 3,998 Lines • Show Last 20 Lines |