MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetUnconfirmedBalance

Method GetUnconfirmedBalance

src/wallet.cpp:2015–2027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2013}
2014
2015CAmount CWallet::GetUnconfirmedBalance() const
2016{
2017 CAmount nTotal = 0;
2018 {
2019 LOCK2(cs_main, cs_wallet);
2020 for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) {
2021 const CWalletTx* pcoin = &(*it).second;
2022 if (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0))
2023 nTotal += pcoin->GetAvailableCredit();
2024 }
2025 }
2026 return nTotal;
2027}
2028
2029CAmount CWallet::GetImmatureBalance() const
2030{

Callers 3

getunconfirmedbalanceFunction · 0.80
getwalletinfoFunction · 0.80
getUnconfirmedBalanceMethod · 0.80

Calls 6

IsFinalTxFunction · 0.85
IsTrustedMethod · 0.80
GetAvailableCreditMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetDepthInMainChainMethod · 0.45

Tested by

no test coverage detected