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

Method GetUnconfirmedWatchOnlyBalance

src/wallet/wallet.cpp:2157–2170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2155}
2156
2157CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const
2158{
2159 CAmount nTotal = 0;
2160 {
2161 LOCK2(cs_main, cs_wallet);
2162 for (const auto& entry : mapWallet)
2163 {
2164 const CWalletTx* pcoin = &entry.second;
2165 if (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0 && pcoin->InMempool())
2166 nTotal += pcoin->GetAvailableCredit(true, ISMINE_WATCH_ONLY);
2167 }
2168 }
2169 return nTotal;
2170}
2171
2172CAmount CWallet::GetImmatureWatchOnlyBalance() const
2173{

Callers 1

getBalancesMethod · 0.80

Calls 4

IsTrustedMethod · 0.80
GetDepthInMainChainMethod · 0.80
InMempoolMethod · 0.80
GetAvailableCreditMethod · 0.80

Tested by

no test coverage detected