@@ -2795,12 +2795,10 @@ std::map<CTxDestination, std::vector<COutput>> CWallet::ListCoins() const
27952795 }
27962796 }
27972797
2798- std::vector<COutPoint> lockedCoins;
2799- ListLockedCoins (lockedCoins);
28002798 // Include watch-only for LegacyScriptPubKeyMan wallets without private keys
28012799 const bool include_watch_only = GetLegacyScriptPubKeyMan () && IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
28022800 const isminetype is_mine_filter = include_watch_only ? ISMINE_WATCH_ONLY : ISMINE_SPENDABLE;
2803- for (const COutPoint& output : lockedCoins ) {
2801+ for (const COutPoint& output : setLockedCoins ) {
28042802 auto it = mapWallet.find (output.hash );
28052803 if (it != mapWallet.end ()) {
28062804 int depth = it->second .GetDepthInMainChain ();
@@ -4496,14 +4494,10 @@ bool CWallet::IsLockedCoin(uint256 hash, unsigned int n) const
44964494 return (setLockedCoins.count (outpt) > 0 );
44974495}
44984496
4499- void CWallet::ListLockedCoins ( std::vector<COutPoint>& vOutpts ) const
4497+ std::vector<COutPoint> CWallet::ListLockedCoins ( ) const
45004498{
45014499 AssertLockHeld (cs_wallet);
4502- for (std::set<COutPoint>::iterator it = setLockedCoins.begin ();
4503- it != setLockedCoins.end (); it++) {
4504- COutPoint outpt = (*it);
4505- vOutpts.push_back (outpt);
4506- }
4500+ return std::vector<COutPoint>(setLockedCoins.begin (), setLockedCoins.end ());
45074501}
45084502
45094503std::vector<COutPoint> CWallet::ListProTxCoins () const { return ListProTxCoins (setWalletUTXO); }
0 commit comments