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

Method tryGetBalances

src/interfaces/wallet.cpp:348–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346 return result;
347 }
348 bool tryGetBalances(WalletBalances& balances, int& num_blocks) override
349 {
350 TRY_LOCK(cs_main, locked_chain);
351 if (!locked_chain) return false;
352 TRY_LOCK(m_wallet.cs_wallet, locked_wallet);
353 if (!locked_wallet) {
354 return false;
355 }
356 balances = getBalances();
357 num_blocks = ::chainActive.Height();
358 return true;
359 }
360 CAmount getBalance() override { return m_wallet.GetBalance(); }
361 CAmount getAvailableBalance(const CCoinControl& coin_control) override
362 {

Callers 1

pollBalanceChangedMethod · 0.80

Calls 1

HeightMethod · 0.80

Tested by

no test coverage detected