MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / getBalances

Method getBalances

src/wallet/interfaces.cpp:374–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372 return m_wallet->FillPSBT(psbtx, options, complete, n_signed);
373 }
374 WalletBalances getBalances() override
375 {
376 const auto bal = GetBalance(*m_wallet);
377 WalletBalances result;
378 result.balance = bal.m_mine_trusted;
379 result.unconfirmed_balance = bal.m_mine_untrusted_pending;
380 result.immature_balance = bal.m_mine_immature;
381 result.used_balance = bal.m_mine_used;
382 result.nonmempool_balance = bal.m_mine_nonmempool;
383 return result;
384 }
385 bool tryGetBalances(WalletBalances& balances, uint256& block_hash) override
386 {
387 TRY_LOCK(m_wallet->cs_wallet, locked_wallet);

Callers 2

sendCoinsMethod · 0.80
TestGUIWatchOnlyFunction · 0.80

Calls 1

GetBalanceFunction · 0.85

Tested by 1

TestGUIWatchOnlyFunction · 0.64