![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
Classes | |
struct | CompareByPriority |
struct | CompareByAmount |
Functions | |
static void | ApproximateBestSubset (vector< pair< CAmount, pair< const CWalletTx *, unsigned int > > >vValue, const CAmount &nTotalLower, const CAmount &nTargetValue, vector< char > &vfBest, CAmount &nBest, int iterations=1000, bool fUseInstantSend=false) |
bool | less_then_denom (const COutput &out1, const COutput &out2) |
static int64_t | GetOldestKeyInPool (const std::set< int64_t > &setKeyPool, CWalletDB &walletdb) |
static void | LoadReserveKeysToSet (std::set< CKeyID > &setAddress, const std::set< int64_t > &setKeyPool, CWalletDB &walletdb) |
CAmount | CWallet::GetBalance () const |
CAmount | CWallet::GetAnonymizableBalance (bool fSkipDenominated=false, bool fSkipUnconfirmed=true) const |
CAmount | CWallet::GetAnonymizedBalance () const |
float | CWallet::GetAverageAnonymizedRounds () const |
CAmount | CWallet::GetNormalizedAnonymizedBalance () const |
CAmount | CWallet::GetNeedsToBeAnonymizedBalance (CAmount nMinBalance=0) const |
CAmount | CWallet::GetDenominatedBalance (bool unconfirmed=false) const |
CAmount | CWallet::GetUnconfirmedBalance () const |
CAmount | CWallet::GetImmatureBalance () const |
CAmount | CWallet::GetWatchOnlyBalance () const |
CAmount | CWallet::GetUnconfirmedWatchOnlyBalance () const |
CAmount | CWallet::GetImmatureWatchOnlyBalance () const |
void | CWallet::AvailableCoins (std::vector< COutput > &vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL, bool fIncludeZeroValue=false, AvailableCoinsType nCoinType=ALL_COINS, bool fUseInstantSend=false) const |
bool | CWallet::SelectCoinsMinConf (const CAmount &nTargetValue, int nConfMine, int nConfTheirs, std::vector< COutput > vCoins, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet, bool fUseInstantSend=false) const |
bool | CWallet::SelectCoins (const CAmount &nTargetValue, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=NULL, AvailableCoinsType nCoinType=ALL_COINS, bool fUseInstantSend=true) const |
bool | CWallet::FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosRet, std::string &strFailReason, bool includeWatching) |
bool | CWallet::SelectCoinsByDenominations (int nDenom, CAmount nValueMin, CAmount nValueMax, std::vector< CTxIn > &vecTxInRet, std::vector< COutput > &vCoinsRet, CAmount &nValueRet, int nPrivateSendRoundsMin, int nPrivateSendRoundsMax) |
bool | CWallet::SelectCoinsGrouppedByAddresses (std::vector< CompactTallyItem > &vecTallyRet, bool fSkipDenominated=true, bool fAnonymizable=true, bool fSkipUnconfirmed=true) const |
bool | CWallet::SelectCoinsDark (CAmount nValueMin, CAmount nValueMax, std::vector< CTxIn > &vecTxInRet, CAmount &nValueRet, int nPrivateSendRoundsMin, int nPrivateSendRoundsMax) const |
bool | CWallet::GetCollateralTxIn (CTxIn &txinRet, CAmount &nValueRet) const |
bool | CWallet::GetMasternodeOutpointAndKeys (COutPoint &outpointRet, CPubKey &pubKeyRet, CKey &keyRet, std::string strTxHash="", std::string strOutputIndex="") |
Get 1000DASH output and keys which can be used for the Masternode. More... | |
bool | CWallet::GetOutpointAndKeysFromOutput (const COutput &out, COutPoint &outpointRet, CPubKey &pubKeyRet, CKey &keyRet) |
Extract txin information and keys from output. More... | |
int | CWallet::CountInputsWithAmount (CAmount nInputAmount) |
bool | CWallet::HasCollateralInputs (bool fOnlyConfirmed=true) const |
bool | CWallet::IsCollateralAmount (CAmount nInputAmount) const |
bool | CWallet::CreateCollateralTransaction (CMutableTransaction &txCollateral, std::string &strReason) |
bool | CWallet::GetBudgetSystemCollateralTX (CTransaction &tx, uint256 hash, CAmount amount, bool fUseInstantSend) |
bool | CWallet::GetBudgetSystemCollateralTX (CWalletTx &tx, uint256 hash, CAmount amount, bool fUseInstantSend) |
bool | CWallet::ConvertList (std::vector< CTxIn > vecTxIn, std::vector< CAmount > &vecAmounts) |
bool | CWallet::CreateTransaction (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosRet, std::string &strFailReason, const CCoinControl *coinControl=NULL, bool sign=true, AvailableCoinsType nCoinType=ALL_COINS, bool fUseInstantSend=false) |
bool | CWallet::CommitTransaction (CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, std::string strCommand="tx") |
bool | CWallet::AddAccountingEntry (const CAccountingEntry &, CWalletDB &pwalletdb) |
static CAmount | CWallet::GetRequiredFee (unsigned int nTxBytes) |
static CAmount | CWallet::GetMinimumFee (unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool &pool) |
DBErrors | CWallet::LoadWallet (bool &fFirstRunRet) |
DBErrors | CWallet::ZapWalletTx (std::vector< CWalletTx > &vWtx) |
bool | CWallet::SetAddressBook (const CTxDestination &address, const std::string &strName, const std::string &purpose) |
bool | CWallet::DelAddressBook (const CTxDestination &address) |
bool | CWallet::SetDefaultKey (const CPubKey &vchPubKey) |
bool | CWallet::NewKeyPool () |
size_t | CWallet::KeypoolCountExternalKeys () |
size_t | CWallet::KeypoolCountInternalKeys () |
bool | CWallet::TopUpKeyPool (unsigned int kpSize=0) |
void | CWallet::ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool, bool fInternal) |
void | CWallet::KeepKey (int64_t nIndex) |
void | CWallet::ReturnKey (int64_t nIndex, bool fInternal) |
bool | CWallet::GetKeyFromPool (CPubKey &key, bool fInternal) |
int64_t | CWallet::GetOldestKeyPoolTime () |
std::map< CTxDestination, CAmount > | CWallet::GetAddressBalances () |
std::set< std::set< CTxDestination > > | CWallet::GetAddressGroupings () |
std::set< CTxDestination > | CWallet::GetAccountAddresses (const std::string &strAccount) const |
bool | CReserveKey::GetReservedKey (CPubKey &pubkey, bool fInternalIn) |
void | CReserveKey::KeepKey () |
void | CReserveKey::ReturnKey () |
void | CWallet::GetAllReserveKeys (std::set< CKeyID > &setAddress) const |
bool | CWallet::UpdatedTransaction (const uint256 &hashTx) |
void | CWallet::GetScriptForMining (boost::shared_ptr< CReserveScript > &script) |
void | CWallet::LockCoin (COutPoint &output) |
void | CWallet::UnlockCoin (COutPoint &output) |
void | CWallet::UnlockAllCoins () |
bool | CWallet::IsLockedCoin (uint256 hash, unsigned int n) const |
void | CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) |
bool CWallet::AddAccountingEntry | ( | const CAccountingEntry & | acentry, |
CWalletDB & | pwalletdb | ||
) |
Definition at line 3579 of file wallet.cpp.
Referenced by movecmd().
|
static |
Definition at line 2423 of file wallet.cpp.
Referenced by CWallet::SelectCoinsMinConf().
void CWallet::AvailableCoins | ( | std::vector< COutput > & | vCoins, |
bool | fOnlyConfirmed = true , |
||
const CCoinControl * | coinControl = NULL , |
||
bool | fIncludeZeroValue = false , |
||
AvailableCoinsType | nCoinType = ALL_COINS , |
||
bool | fUseInstantSend = false |
||
) | const |
populate vCoins with vector of available COutputs.
Definition at line 2360 of file wallet.cpp.
Referenced by listunspent(), and masternode().
bool CWallet::CommitTransaction | ( | CWalletTx & | wtxNew, |
CReserveKey & | reservekey, | ||
CConnman * | connman, | ||
std::string | strCommand = "tx" |
||
) |
Call after CreateTransaction unless you want to abort
Definition at line 3527 of file wallet.cpp.
Referenced by CPrivateSendClient::CreateDenominated(), gobject(), CPrivateSendClient::MakeCollateralAmounts(), sendmany(), and SendMoney().
Definition at line 3158 of file wallet.cpp.
Referenced by CPrivateSendClient::StartNewQueue().
int CWallet::CountInputsWithAmount | ( | CAmount | nInputAmount | ) |
Definition at line 3044 of file wallet.cpp.
Referenced by CPrivateSendClient::CreateDenominated().
bool CWallet::CreateCollateralTransaction | ( | CMutableTransaction & | txCollateral, |
std::string & | strReason | ||
) |
Definition at line 3088 of file wallet.cpp.
Referenced by CPrivateSendClient::DoAutomaticDenominating().
bool CWallet::CreateTransaction | ( | const std::vector< CRecipient > & | vecSend, |
CWalletTx & | wtxNew, | ||
CReserveKey & | reservekey, | ||
CAmount & | nFeeRet, | ||
int & | nChangePosRet, | ||
std::string & | strFailReason, | ||
const CCoinControl * | coinControl = NULL , |
||
bool | sign = true , |
||
AvailableCoinsType | nCoinType = ALL_COINS , |
||
bool | fUseInstantSend = false |
||
) |
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed
Definition at line 3173 of file wallet.cpp.
Referenced by CPrivateSendClient::CreateDenominated(), CPrivateSendClient::MakeCollateralAmounts(), sendmany(), and SendMoney().
bool CWallet::DelAddressBook | ( | const CTxDestination & | address | ) |
Definition at line 3703 of file wallet.cpp.
bool CWallet::FundTransaction | ( | CMutableTransaction & | tx, |
CAmount & | nFeeRet, | ||
int & | nChangePosRet, | ||
std::string & | strFailReason, | ||
bool | includeWatching | ||
) |
Insert additional inputs into the transaction by calling CreateTransaction();
Definition at line 2727 of file wallet.cpp.
Referenced by fundrawtransaction().
std::set< CTxDestination > CWallet::GetAccountAddresses | ( | const std::string & | strAccount | ) | const |
Definition at line 4087 of file wallet.cpp.
Referenced by getreceivedbyaccount().
std::map< CTxDestination, CAmount > CWallet::GetAddressBalances | ( | ) |
Definition at line 3954 of file wallet.cpp.
Referenced by listaddressgroupings().
set< set< CTxDestination > > CWallet::GetAddressGroupings | ( | ) |
Definition at line 3994 of file wallet.cpp.
Referenced by listaddressgroupings().
void CWallet::GetAllReserveKeys | ( | std::set< CKeyID > & | setAddress | ) | const |
Definition at line 4151 of file wallet.cpp.
Referenced by dumpwallet().
CAmount CWallet::GetAnonymizableBalance | ( | bool | fSkipDenominated = false , |
bool | fSkipUnconfirmed = true |
||
) | const |
Definition at line 2155 of file wallet.cpp.
Referenced by CPrivateSendClient::DoAutomaticDenominating(), and OverviewPage::updatePrivateSendProgress().
CAmount CWallet::GetAnonymizedBalance | ( | ) | const |
Definition at line 2177 of file wallet.cpp.
Referenced by getinfo().
float CWallet::GetAverageAnonymizedRounds | ( | ) | const |
Definition at line 2202 of file wallet.cpp.
Referenced by OverviewPage::updatePrivateSendProgress().
CAmount CWallet::GetBalance | ( | ) | const |
Definition at line 2139 of file wallet.cpp.
Referenced by getbalance(), getinfo(), getwalletinfo(), CActiveMasternode::ManageStateInitial(), and SendMoney().
bool CWallet::GetBudgetSystemCollateralTX | ( | CTransaction & | tx, |
uint256 | hash, | ||
CAmount | amount, | ||
bool | fUseInstantSend | ||
) |
Definition at line 3123 of file wallet.cpp.
Referenced by gobject().
bool CWallet::GetBudgetSystemCollateralTX | ( | CWalletTx & | tx, |
uint256 | hash, | ||
CAmount | amount, | ||
bool | fUseInstantSend | ||
) |
Definition at line 3133 of file wallet.cpp.
Definition at line 2967 of file wallet.cpp.
CAmount CWallet::GetDenominatedBalance | ( | bool | unconfirmed = false | ) | const |
Definition at line 2268 of file wallet.cpp.
Referenced by CPrivateSendClient::DoAutomaticDenominating(), and OverviewPage::updatePrivateSendProgress().
CAmount CWallet::GetImmatureBalance | ( | ) | const |
Definition at line 2301 of file wallet.cpp.
Referenced by getwalletinfo().
CAmount CWallet::GetImmatureWatchOnlyBalance | ( | ) | const |
Definition at line 2346 of file wallet.cpp.
bool CWallet::GetKeyFromPool | ( | CPubKey & | key, |
bool | fInternal | ||
) |
Definition at line 3903 of file wallet.cpp.
Referenced by AppInit2(), GetAccountAddress(), and getnewaddress().
bool CWallet::GetMasternodeOutpointAndKeys | ( | COutPoint & | outpointRet, |
CPubKey & | pubKeyRet, | ||
CKey & | keyRet, | ||
std::string | strTxHash = "" , |
||
std::string | strOutputIndex = "" |
||
) |
Get 1000DASH output and keys which can be used for the Masternode.
Definition at line 2987 of file wallet.cpp.
Referenced by CMasternodeBroadcast::Create(), CActiveMasternode::ManageStateInitial(), CActiveMasternode::ManageStateLocal(), and masternode().
|
static |
Estimate the minimum fee considering user set parameters and the required fee
Definition at line 3596 of file wallet.cpp.
Referenced by CoinControlDialog::updateLabels().
Definition at line 2244 of file wallet.cpp.
Referenced by CPrivateSendClient::DoAutomaticDenominating().
CAmount CWallet::GetNormalizedAnonymizedBalance | ( | ) | const |
Definition at line 2224 of file wallet.cpp.
Referenced by OverviewPage::updatePrivateSendProgress().
|
static |
Definition at line 3923 of file wallet.cpp.
Referenced by CWallet::GetOldestKeyPoolTime().
int64_t CWallet::GetOldestKeyPoolTime | ( | ) |
Definition at line 3933 of file wallet.cpp.
Referenced by getinfo(), and getwalletinfo().
bool CWallet::GetOutpointAndKeysFromOutput | ( | const COutput & | out, |
COutPoint & | outpointRet, | ||
CPubKey & | pubKeyRet, | ||
CKey & | keyRet | ||
) |
Extract txin information and keys from output.
Definition at line 3015 of file wallet.cpp.
|
static |
Return the minimum required fee taking into account the floating relay fee and user set minimum transaction fee
Definition at line 3591 of file wallet.cpp.
Referenced by SendCoinsDialog::setMinimumFee(), SendCoinsDialog::setModel(), CoinControlDialog::updateLabels(), SendCoinsDialog::updateMinFeeLabel(), and SendCoinsDialog::updateSmartFeeLabel().
bool CReserveKey::GetReservedKey | ( | CPubKey & | pubkey, |
bool | fInternalIn | ||
) |
Definition at line 4101 of file wallet.cpp.
Referenced by CKeyHolder::CKeyHolder(), CWallet::CreateCollateralTransaction(), CWallet::CreateTransaction(), getrawchangeaddress(), and CPrivateSendClient::MakeCollateralAmounts().
|
virtual |
Reimplemented from CValidationInterface.
Definition at line 4182 of file wallet.cpp.
CAmount CWallet::GetUnconfirmedBalance | ( | ) | const |
Definition at line 2286 of file wallet.cpp.
Referenced by getunconfirmedbalance(), and getwalletinfo().
CAmount CWallet::GetUnconfirmedWatchOnlyBalance | ( | ) | const |
Definition at line 2331 of file wallet.cpp.
CAmount CWallet::GetWatchOnlyBalance | ( | ) | const |
Definition at line 2315 of file wallet.cpp.
bool CWallet::HasCollateralInputs | ( | bool | fOnlyConfirmed = true | ) | const |
Definition at line 3072 of file wallet.cpp.
Referenced by CPrivateSendClient::CreateDenominated(), and CPrivateSendClient::DoAutomaticDenominating().
bool CWallet::IsCollateralAmount | ( | CAmount | nInputAmount | ) | const |
Definition at line 3080 of file wallet.cpp.
bool CWallet::IsLockedCoin | ( | uint256 | hash, |
unsigned int | n | ||
) | const |
Definition at line 4221 of file wallet.cpp.
void CWallet::KeepKey | ( | int64_t | nIndex | ) |
Definition at line 3877 of file wallet.cpp.
void CReserveKey::KeepKey | ( | ) |
Definition at line 4120 of file wallet.cpp.
Referenced by CWallet::CommitTransaction(), CWallet::CreateCollateralTransaction(), getrawchangeaddress(), CKeyHolder::KeepKey(), CReserveKey::KeepScript(), and CPrivateSendClient::MakeCollateralAmounts().
size_t CWallet::KeypoolCountExternalKeys | ( | ) |
Definition at line 3767 of file wallet.cpp.
Referenced by AppInit2(), getwalletinfo(), and CWalletDB::LoadWallet().
size_t CWallet::KeypoolCountInternalKeys | ( | ) |
Definition at line 3773 of file wallet.cpp.
Referenced by AppInit2(), and getwalletinfo().
Definition at line 2483 of file wallet.cpp.
Referenced by CWallet::SelectCoinsMinConf().
void CWallet::ListLockedCoins | ( | std::vector< COutPoint > & | vOutpts | ) |
Definition at line 4229 of file wallet.cpp.
Referenced by listlockunspent().
|
static |
Definition at line 4138 of file wallet.cpp.
Referenced by CWallet::GetAllReserveKeys().
DBErrors CWallet::LoadWallet | ( | bool & | fFirstRunRet | ) |
Definition at line 3616 of file wallet.cpp.
Referenced by AppInit2().
void CWallet::LockCoin | ( | COutPoint & | output | ) |
Definition at line 4193 of file wallet.cpp.
Referenced by AppInit2(), lockunspent(), CActiveMasternode::ManageStateLocal(), and CPrivateSendClient::PrepareDenominate().
bool CWallet::NewKeyPool | ( | ) |
Mark old keypool keys as used, and generate all new keys
Definition at line 3743 of file wallet.cpp.
void CWallet::ReserveKeyFromKeyPool | ( | int64_t & | nIndex, |
CKeyPool & | keypool, | ||
bool | fInternal | ||
) |
Definition at line 3841 of file wallet.cpp.
void CWallet::ReturnKey | ( | int64_t | nIndex, |
bool | fInternal | ||
) |
Definition at line 3889 of file wallet.cpp.
void CReserveKey::ReturnKey | ( | ) |
Definition at line 4129 of file wallet.cpp.
Referenced by CWallet::CreateTransaction(), CPrivateSendClient::MakeCollateralAmounts(), CKeyHolder::ReturnKey(), and CReserveKey::~CReserveKey().
|
private |
Select a set of coins such that nValueRet >= nTargetValue and at least all coins from coinControl are selected; Never select unconfirmed coins if they are not ours
Definition at line 2623 of file wallet.cpp.
bool CWallet::SelectCoinsByDenominations | ( | int | nDenom, |
CAmount | nValueMin, | ||
CAmount | nValueMax, | ||
std::vector< CTxIn > & | vecTxInRet, | ||
std::vector< COutput > & | vCoinsRet, | ||
CAmount & | nValueRet, | ||
int | nPrivateSendRoundsMin, | ||
int | nPrivateSendRoundsMax | ||
) |
Definition at line 2762 of file wallet.cpp.
Referenced by CPrivateSendClient::JoinExistingQueue(), and CPrivateSendClient::PrepareDenominate().
bool CWallet::SelectCoinsDark | ( | CAmount | nValueMin, |
CAmount | nValueMax, | ||
std::vector< CTxIn > & | vecTxInRet, | ||
CAmount & | nValueRet, | ||
int | nPrivateSendRoundsMin, | ||
int | nPrivateSendRoundsMax | ||
) | const |
Definition at line 2930 of file wallet.cpp.
Referenced by CPrivateSendClient::StartNewQueue().
bool CWallet::SelectCoinsGrouppedByAddresses | ( | std::vector< CompactTallyItem > & | vecTallyRet, |
bool | fSkipDenominated = true , |
||
bool | fAnonymizable = true , |
||
bool | fSkipUnconfirmed = true |
||
) | const |
Definition at line 2831 of file wallet.cpp.
Referenced by CPrivateSendClient::CreateDenominated(), and CPrivateSendClient::MakeCollateralAmounts().
bool CWallet::SelectCoinsMinConf | ( | const CAmount & | nTargetValue, |
int | nConfMine, | ||
int | nConfTheirs, | ||
std::vector< COutput > | vCoins, | ||
std::set< std::pair< const CWalletTx *, unsigned int > > & | setCoinsRet, | ||
CAmount & | nValueRet, | ||
bool | fUseInstantSend = false |
||
) | const |
Shuffle and select coins until nTargetValue is reached while avoiding small change; This method is stochastic for some inputs and upon completion the coin set and corresponding actual target value is assembled
Definition at line 2498 of file wallet.cpp.
bool CWallet::SetAddressBook | ( | const CTxDestination & | address, |
const std::string & | strName, | ||
const std::string & | purpose | ||
) |
Definition at line 3683 of file wallet.cpp.
Referenced by addmultisigaddress(), AppInit2(), GetAccountAddress(), getnewaddress(), ImportAddress(), importprivkey(), importwallet(), and setaccount().
bool CWallet::SetDefaultKey | ( | const CPubKey & | vchPubKey | ) |
Definition at line 3728 of file wallet.cpp.
Referenced by AppInit2().
bool CWallet::TopUpKeyPool | ( | unsigned int | kpSize = 0 | ) |
Definition at line 3779 of file wallet.cpp.
Referenced by getnewaddress(), getrawchangeaddress(), keypoolrefill(), and walletpassphrase().
void CWallet::UnlockAllCoins | ( | ) |
Definition at line 4215 of file wallet.cpp.
Referenced by lockunspent().
void CWallet::UnlockCoin | ( | COutPoint & | output | ) |
Definition at line 4204 of file wallet.cpp.
Referenced by lockunspent(), CPrivateSendClient::PrepareDenominate(), and CPrivateSendClient::UnlockCoins().
|
virtual |
Reimplemented from CValidationInterface.
Definition at line 4168 of file wallet.cpp.
Referenced by CInstantSend::UpdateLockedTransaction().
Definition at line 3657 of file wallet.cpp.
Referenced by AppInit2().