Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 3,720 Lines • ▼ Show 20 Lines | int64_t CWallet::GetOldestKeyPoolTime() { | ||||
return oldestKey; | return oldestKey; | ||||
} | } | ||||
std::map<CTxDestination, Amount> CWallet::GetAddressBalances() { | std::map<CTxDestination, Amount> CWallet::GetAddressBalances() { | ||||
std::map<CTxDestination, Amount> balances; | std::map<CTxDestination, Amount> balances; | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
for (std::pair<TxId, CWalletTx> walletEntry : mapWallet) { | for (const auto &walletEntry : mapWallet) { | ||||
CWalletTx *pcoin = &walletEntry.second; | const CWalletTx *pcoin = &walletEntry.second; | ||||
if (!pcoin->IsTrusted()) { | if (!pcoin->IsTrusted()) { | ||||
continue; | continue; | ||||
} | } | ||||
if (pcoin->IsImmatureCoinBase()) { | if (pcoin->IsImmatureCoinBase()) { | ||||
continue; | continue; | ||||
} | } | ||||
Show All 28 Lines | |||||
} | } | ||||
std::set<std::set<CTxDestination>> CWallet::GetAddressGroupings() { | std::set<std::set<CTxDestination>> CWallet::GetAddressGroupings() { | ||||
// mapWallet | // mapWallet | ||||
AssertLockHeld(cs_wallet); | AssertLockHeld(cs_wallet); | ||||
std::set<std::set<CTxDestination>> groupings; | std::set<std::set<CTxDestination>> groupings; | ||||
std::set<CTxDestination> grouping; | std::set<CTxDestination> grouping; | ||||
for (std::pair<uint256, CWalletTx> walletEntry : mapWallet) { | for (const auto &walletEntry : mapWallet) { | ||||
CWalletTx *pcoin = &walletEntry.second; | const CWalletTx *pcoin = &walletEntry.second; | ||||
if (pcoin->tx->vin.size() > 0) { | if (pcoin->tx->vin.size() > 0) { | ||||
bool any_mine = false; | bool any_mine = false; | ||||
// Group all input addresses with each other. | // Group all input addresses with each other. | ||||
for (CTxIn txin : pcoin->tx->vin) { | for (CTxIn txin : pcoin->tx->vin) { | ||||
CTxDestination address; | CTxDestination address; | ||||
// If this input isn't mine, ignore it. | // If this input isn't mine, ignore it. | ||||
if (!IsMine(txin)) { | if (!IsMine(txin)) { | ||||
▲ Show 20 Lines • Show All 777 Lines • Show Last 20 Lines |