diff options
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 3b6dfd42ca..cfc9ee5c1a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -78,7 +78,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) uint256 hash = wtx.GetHash(); entry.push_back(Pair("txid", hash.GetHex())); UniValue conflicts(UniValue::VARR); - BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts()) + for (const uint256& conflict : wtx.GetConflicts()) conflicts.push_back(conflict.GetHex()); entry.push_back(Pair("walletconflicts", conflicts)); entry.push_back(Pair("time", wtx.GetTxTime())); @@ -96,7 +96,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry) } entry.push_back(Pair("bip125-replaceable", rbfStatus)); - BOOST_FOREACH(const PAIRTYPE(std::string, std::string)& item, wtx.mapValue) + for (const PAIRTYPE(std::string, std::string)& item : wtx.mapValue) entry.push_back(Pair(item.first, item.second)); } @@ -490,7 +490,7 @@ UniValue listaddressgroupings(const JSONRPCRequest& request) std::map<CTxDestination, CAmount> balances = pwallet->GetAddressBalances(); for (std::set<CTxDestination> grouping : pwallet->GetAddressGroupings()) { UniValue jsonGrouping(UniValue::VARR); - BOOST_FOREACH(CTxDestination address, grouping) + for (CTxDestination address : grouping) { UniValue addressInfo(UniValue::VARR); addressInfo.push_back(CBitcoinAddress(address).ToString()); @@ -616,7 +616,7 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request) if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx)) continue; - BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout) + for (const CTxOut& txout : wtx.tx->vout) if (txout.scriptPubKey == scriptPubKey) if (wtx.GetDepthInMainChain() >= nMinDepth) nAmount += txout.nValue; @@ -671,7 +671,7 @@ UniValue getreceivedbyaccount(const JSONRPCRequest& request) if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx)) continue; - BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout) + for (const CTxOut& txout : wtx.tx->vout) { CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwallet, address) && setAddress.count(address)) { @@ -950,7 +950,7 @@ UniValue sendmany(const JSONRPCRequest& request) CAmount totalAmount = 0; std::vector<std::string> keys = sendTo.getKeys(); - BOOST_FOREACH(const std::string& name_, keys) + for (const std::string& name_ : keys) { CBitcoinAddress address(name_); if (!address.IsValid()) @@ -1191,7 +1191,7 @@ UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByA if (nDepth < nMinDepth) continue; - BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout) + for (const CTxOut& txout : wtx.tx->vout) { CTxDestination address; if (!ExtractDestination(txout.scriptPubKey, address)) @@ -1251,7 +1251,7 @@ UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByA UniValue transactions(UniValue::VARR); if (it != mapTally.end()) { - BOOST_FOREACH(const uint256& _item, (*it).second.txids) + for (const uint256& _item : (*it).second.txids) { transactions.push_back(_item.GetHex()); } @@ -1385,7 +1385,7 @@ void ListTransactions(CWallet* const pwallet, const CWalletTx& wtx, const std::s // Sent if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount)) { - BOOST_FOREACH(const COutputEntry& s, listSent) + for (const COutputEntry& s : listSent) { UniValue entry(UniValue::VOBJ); if (involvesWatchonly || (::IsMine(*pwallet, s.destination) & ISMINE_WATCH_ONLY)) { @@ -1410,7 +1410,7 @@ void ListTransactions(CWallet* const pwallet, const CWalletTx& wtx, const std::s // Received if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth) { - BOOST_FOREACH(const COutputEntry& r, listReceived) + for (const COutputEntry& r : listReceived) { std::string account; if (pwallet->mapAddressBook.count(r.destination)) { @@ -1655,11 +1655,11 @@ UniValue listaccounts(const JSONRPCRequest& request) continue; wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, includeWatchonly); mapAccountBalances[strSentAccount] -= nFee; - BOOST_FOREACH(const COutputEntry& s, listSent) + for (const COutputEntry& s : listSent) mapAccountBalances[strSentAccount] -= s.amount; if (nDepth >= nMinDepth) { - BOOST_FOREACH(const COutputEntry& r, listReceived) + for (const COutputEntry& r : listReceived) if (pwallet->mapAddressBook.count(r.destination)) { mapAccountBalances[pwallet->mapAddressBook[r.destination].name] += r.amount; } @@ -1669,11 +1669,11 @@ UniValue listaccounts(const JSONRPCRequest& request) } const std::list<CAccountingEntry>& acentries = pwallet->laccentries; - BOOST_FOREACH(const CAccountingEntry& entry, acentries) + for (const CAccountingEntry& entry : acentries) mapAccountBalances[entry.strAccount] += entry.nCreditDebit; UniValue ret(UniValue::VOBJ); - BOOST_FOREACH(const PAIRTYPE(std::string, CAmount)& accountBalance, mapAccountBalances) { + for (const PAIRTYPE(std::string, CAmount)& accountBalance : mapAccountBalances) { ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second))); } return ret; @@ -2338,7 +2338,7 @@ UniValue listlockunspent(const JSONRPCRequest& request) UniValue ret(UniValue::VARR); - BOOST_FOREACH(COutPoint &outpt, vOutpts) { + for (COutPoint &outpt : vOutpts) { UniValue o(UniValue::VOBJ); o.push_back(Pair("txid", outpt.hash.GetHex())); @@ -2456,7 +2456,7 @@ UniValue resendwallettransactions(const JSONRPCRequest& request) std::vector<uint256> txids = pwallet->ResendWalletTransactionsBefore(GetTime(), g_connman.get()); UniValue result(UniValue::VARR); - BOOST_FOREACH(const uint256& txid, txids) + for (const uint256& txid : txids) { result.push_back(txid.ToString()); } @@ -2581,7 +2581,7 @@ UniValue listunspent(const JSONRPCRequest& request) LOCK2(cs_main, pwallet->cs_wallet); pwallet->AvailableCoins(vecOutputs, !include_unsafe, NULL, nMinimumAmount, nMaximumAmount, nMinimumSumAmount, nMaximumCount, nMinDepth, nMaxDepth); - BOOST_FOREACH(const COutput& out, vecOutputs) { + for (const COutput& out : vecOutputs) { CTxDestination address; const CScript& scriptPubKey = out.tx->tx->vout[out.i].scriptPubKey; bool fValidAddress = ExtractDestination(scriptPubKey, address); |