MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetBalance

Method GetBalance

src/wallet/wallet.cpp:2111–2126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2109
2110
2111CAmount CWallet::GetBalance(const isminefilter& filter, const int min_depth) const
2112{
2113 CAmount nTotal = 0;
2114 {
2115 LOCK2(cs_main, cs_wallet);
2116 for (const auto& entry : mapWallet)
2117 {
2118 const CWalletTx* pcoin = &entry.second;
2119 if (pcoin->IsTrusted() && pcoin->GetDepthInMainChain() >= min_depth) {
2120 nTotal += pcoin->GetAvailableCredit(true, filter);
2121 }
2122 }
2123 }
2124
2125 return nTotal;
2126}
2127
2128CAmount CWallet::GetUnconfirmedBalance() const
2129{

Callers 5

SendMoneyFunction · 0.80
getbalanceFunction · 0.80
getwalletinfoFunction · 0.80
getBalancesMethod · 0.80
getBalanceMethod · 0.80

Calls 3

IsTrustedMethod · 0.80
GetDepthInMainChainMethod · 0.80
GetAvailableCreditMethod · 0.80

Tested by

no test coverage detected