PIVX Core  5.6.99
P2P Digital Currency
wallet.cpp
Go to the documentation of this file.
1 // Copyright (c) 2018-2020 The Bitcoin Core developers
2 // Copyright (c) 2020-2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
5 
6 #include "interfaces/wallet.h"
7 #include "wallet.h"
8 
9 namespace interfaces {
10 
12  WalletBalances result;
14  result.balance = balance.m_mine_trusted + balance.m_mine_trusted_shield;
16  result.immature_balance = balance.m_mine_immature;
18  if (result.have_watch_only) {
22  }
24  if (result.have_coldstaking) { // At the moment, the GUI is not using the cold staked balance.
26  }
27  result.shielded_balance = balance.m_mine_trusted_shield;
29  return result;
30  }
31 
32 } // namespace interfaces
virtual bool HaveWatchOnly(const CScript &dest) const
Definition: keystore.cpp:104
CWallet & m_wallet
Definition: wallet.h:48
WalletBalances getBalances()
Definition: wallet.cpp:11
CAmount GetImmatureWatchOnlyBalance() const
Definition: wallet.cpp:2303
CAmount GetColdStakingBalance() const
Definition: wallet.cpp:2188
Balance GetBalance(int min_depth=0) const
Definition: wallet.cpp:2121
CAmount GetWatchOnlyBalance() const
Definition: wallet.cpp:2287
CAmount GetUnconfirmedWatchOnlyBalance() const
Definition: wallet.cpp:2295
CAmount m_mine_trusted
Trusted, at depth=GetBalance.min_depth or more.
Definition: wallet.h:1049
CAmount m_mine_trusted_shield
Trusted shield, at depth=GetBalance.min_depth or more.
Definition: wallet.h:1052
CAmount m_mine_untrusted_pending
Untrusted, but in mempool (pending)
Definition: wallet.h:1050
CAmount m_mine_immature
Immature coinbases/coinstakes in the main chain.
Definition: wallet.h:1051
CAmount m_mine_untrusted_shielded_balance
Untrusted shield, but in mempool (pending)
Definition: wallet.h:1053
CAmount m_mine_cs_delegated_trusted
Trusted, at depth=GetBalance.min_depth or more. Part of m_mine_trusted as well.
Definition: wallet.h:1054
Collection of wallet balances.
Definition: wallet.h:16
CAmount watch_only_balance
Definition: wallet.h:21
CAmount unconfirmed_balance
Definition: wallet.h:18
CAmount unconfirmed_shielded_balance
Definition: wallet.h:28
CAmount unconfirmed_watch_only_balance
Definition: wallet.h:22
CAmount immature_watch_only_balance
Definition: wallet.h:23
CAmount coldstaked_balance
Definition: wallet.h:26