Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,178 Lines • ▼ Show 20 Lines | static UniValue listlockunspent(const Config &config, | ||||
LOCK2(cs_main, pwallet->cs_wallet); | LOCK2(cs_main, pwallet->cs_wallet); | ||||
std::vector<COutPoint> vOutpts; | std::vector<COutPoint> vOutpts; | ||||
pwallet->ListLockedCoins(vOutpts); | pwallet->ListLockedCoins(vOutpts); | ||||
UniValue ret(UniValue::VARR); | UniValue ret(UniValue::VARR); | ||||
for (COutPoint &output : vOutpts) { | for (const COutPoint &output : vOutpts) { | ||||
UniValue o(UniValue::VOBJ); | UniValue o(UniValue::VOBJ); | ||||
o.pushKV("txid", output.GetTxId().GetHex()); | o.pushKV("txid", output.GetTxId().GetHex()); | ||||
o.pushKV("vout", int(output.GetN())); | o.pushKV("vout", int(output.GetN())); | ||||
ret.push_back(o); | ret.push_back(o); | ||||
} | } | ||||
return ret; | return ret; | ||||
▲ Show 20 Lines • Show All 1,225 Lines • Show Last 20 Lines |