| 332 | return {}; |
| 333 | } |
| 334 | WalletBalances getBalances() override |
| 335 | { |
| 336 | WalletBalances result; |
| 337 | result.balance = m_wallet.GetBalance(); |
| 338 | result.unconfirmed_balance = m_wallet.GetUnconfirmedBalance(); |
| 339 | result.immature_balance = m_wallet.GetImmatureBalance(); |
| 340 | result.have_watch_only = m_wallet.HaveWatchOnly(); |
| 341 | if (result.have_watch_only) { |
| 342 | result.watch_only_balance = m_wallet.GetBalance(ISMINE_WATCH_ONLY); |
| 343 | result.unconfirmed_watch_only_balance = m_wallet.GetUnconfirmedWatchOnlyBalance(); |
| 344 | result.immature_watch_only_balance = m_wallet.GetImmatureWatchOnlyBalance(); |
| 345 | } |
| 346 | return result; |
| 347 | } |
| 348 | bool tryGetBalances(WalletBalances& balances, int& num_blocks) override |
| 349 | { |
| 350 | TRY_LOCK(cs_main, locked_chain); |
no test coverage detected