Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,423 Lines • ▼ Show 20 Lines | static UniValue listunspent(const Config &config, | ||||
// the user could have gotten from another RPC command prior to now | // the user could have gotten from another RPC command prior to now | ||||
pwallet->BlockUntilSyncedToCurrentChain(); | pwallet->BlockUntilSyncedToCurrentChain(); | ||||
UniValue results(UniValue::VARR); | UniValue results(UniValue::VARR); | ||||
std::vector<COutput> vecOutputs; | std::vector<COutput> vecOutputs; | ||||
{ | { | ||||
CCoinControl cctl; | CCoinControl cctl; | ||||
cctl.m_avoid_address_reuse = false; | cctl.m_avoid_address_reuse = false; | ||||
cctl.m_min_depth = nMinDepth; | |||||
cctl.m_max_depth = nMaxDepth; | |||||
auto locked_chain = pwallet->chain().lock(); | auto locked_chain = pwallet->chain().lock(); | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
pwallet->AvailableCoins(*locked_chain, vecOutputs, !include_unsafe, | pwallet->AvailableCoins(*locked_chain, vecOutputs, !include_unsafe, | ||||
&cctl, nMinimumAmount, nMaximumAmount, | &cctl, nMinimumAmount, nMaximumAmount, | ||||
nMinimumSumAmount, nMaximumCount, nMinDepth, | nMinimumSumAmount, nMaximumCount); | ||||
nMaxDepth); | |||||
} | } | ||||
LOCK(pwallet->cs_wallet); | LOCK(pwallet->cs_wallet); | ||||
const bool avoid_reuse = pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE); | const bool avoid_reuse = pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE); | ||||
for (const COutput &out : vecOutputs) { | for (const COutput &out : vecOutputs) { | ||||
CTxDestination address; | CTxDestination address; | ||||
▲ Show 20 Lines • Show All 1,285 Lines • Show Last 20 Lines |