Fabcoin Core  0.16.2
P2P Digital Currency
Functions
Actions

Functions

CAmount CWallet::GetBalance () const
 
CAmount CWallet::GetUnconfirmedBalance () const
 
CAmount CWallet::GetImmatureBalance () const
 
CAmount CWallet::GetWatchOnlyBalance () const
 
CAmount CWallet::GetUnconfirmedWatchOnlyBalance () const
 
CAmount CWallet::GetImmatureWatchOnlyBalance () const
 
CAmount CWallet::GetLegacyBalance (const isminefilter &filter, int minDepth, const std::string *account) const
 
CAmount CWallet::GetAvailableBalance (const CCoinControl *coinControl=nullptr) const
 
void CWallet::AvailableCoins (std::vector< COutput > &vCoins, bool fOnlySafe=true, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t &nMaximumCount=0, const int &nMinDepth=0, const int &nMaxDepth=9999999) const
 populate vCoins with vector of available COutputs. More...
 
std::map< CTxDestination, std::vector< COutput > > CWallet::ListCoins () const
 Return list of available coins and locked coins grouped by non-change output address. More...
 
const CTxOutCWallet::FindNonChangeParentOutput (const CTransaction &tx, int output) const
 Find non-change parent output. More...
 
bool CWallet::SelectCoinsMinConf (const CAmount &nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector< COutput > vCoins, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet) 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. More...
 
bool CWallet::SelectCoins (const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, std::set< CInputCoin > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=nullptr) const
 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. More...
 
bool CWallet::SignTransaction (CMutableTransaction &tx)
 
bool CWallet::FundTransaction (CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl)
 Insert additional inputs into the transaction by calling CreateTransaction();. More...
 
bool CWallet::CreateTransaction (const std::vector< CRecipient > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, int &nChangePosInOut, std::string &strFailReason, const CCoinControl &coin_control, bool sign=true, CAmount nGasFee=0, bool hasSender=false)
 Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More...
 
bool CWallet::CommitTransaction (CWalletTx &wtxNew, CReserveKey &reservekey, CConnman *connman, CValidationState &state)
 Call after CreateTransaction unless you want to abort. More...
 
void CWallet::ListAccountCreditDebit (const std::string &strAccount, std::list< CAccountingEntry > &entries)
 
bool CWallet::AddAccountingEntry (const CAccountingEntry &)
 
bool CWallet::AddAccountingEntry (const CAccountingEntry &, CWalletDB *pwalletdb)
 
static CAmount CWallet::GetRequiredFee (unsigned int nTxBytes)
 Return the minimum required fee taking into account the floating relay fee and user set minimum transaction fee. More...
 
static CAmount CWallet::GetMinimumFee (unsigned int nTxBytes, const CCoinControl &coin_control, const CTxMemPool &pool, const CBlockPolicyEstimator &estimator, FeeCalculation *feeCalc)
 Estimate the minimum fee considering user set parameters and the required fee. More...
 
DBErrors CWallet::LoadWallet (bool &fFirstRunRet)
 
DBErrors CWallet::ZapSelectTx (std::vector< uint256 > &vHashIn, std::vector< uint256 > &vHashOut)
 
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)
 
const std::string & CWallet::GetAccountName (const CScript &scriptPubKey) const
 
bool CWallet::SetDefaultKey (const CPubKey &vchPubKey)
 
bool CWallet::NewKeyPool ()
 Mark old keypool keys as used, and generate all new keys. More...
 
size_t CWallet::KeypoolCountExternalKeys ()
 
void CWallet::LoadKeyPool (int64_t nIndex, const CKeyPool &keypool)
 
bool CWallet::TopUpKeyPool (unsigned int kpSize=0)
 
void CWallet::ReserveKeyFromKeyPool (int64_t &nIndex, CKeyPool &keypool, bool fRequestedInternal)
 
void CWallet::KeepKey (int64_t nIndex)
 
void CWallet::ReturnKey (int64_t nIndex, bool fInternal, const CPubKey &pubkey)
 
bool CWallet::GetKeyFromPool (CPubKey &key, bool internal=false)
 
int64_t CWallet::GetOldestKeyPoolTime ()
 
std::map< CTxDestination, CAmountCWallet::GetAddressBalances ()
 
std::set< std::set< CTxDestination > > CWallet::GetAddressGroupings ()
 
std::set< CTxDestinationCWallet::GetAccountAddresses (const std::string &strAccount) const
 
bool CReserveKey::GetReservedKey (CPubKey &pubkey, bool internal=false)
 
void CReserveKey::KeepKey ()
 
void CReserveKey::ReturnKey ()
 
void CWallet::MarkReserveKeysAsUsed (int64_t keypool_id)
 Marks all keys in the keypool up to and including reserve_key as used. More...
 
void CWallet::GetScriptForMining (std::shared_ptr< CReserveScript > &script)
 
void CWallet::LockCoin (const COutPoint &output)
 
void CWallet::UnlockCoin (const COutPoint &output)
 
void CWallet::UnlockAllCoins ()
 
bool CWallet::IsLockedCoin (uint256 hash, unsigned int n) const
 
void CWallet::ListLockedCoins (std::vector< COutPoint > &vOutpts) const
 

Detailed Description

Function Documentation

bool CWallet::AddAccountingEntry ( const CAccountingEntry acentry)

Definition at line 3089 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::AddAccountingEntry ( const CAccountingEntry acentry,
CWalletDB pwalletdb 
)

Definition at line 3096 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::AvailableCoins ( std::vector< COutput > &  vCoins,
bool  fOnlySafe = true,
const CCoinControl coinControl = nullptr,
const CAmount nMinimumAmount = 1,
const CAmount nMaximumAmount = MAX_MONEY,
const CAmount nMinimumSumAmount = MAX_MONEY,
const uint64_t &  nMaximumCount = 0,
const int &  nMinDepth = 0,
const int &  nMaxDepth = 9999999 
) const

populate vCoins with vector of available COutputs.

Definition at line 2167 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::CommitTransaction ( CWalletTx wtxNew,
CReserveKey reservekey,
CConnman connman,
CValidationState state 
)

Call after CreateTransaction unless you want to abort.

Definition at line 3045 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::CreateTransaction ( const std::vector< CRecipient > &  vecSend,
CWalletTx wtxNew,
CReserveKey reservekey,
CAmount nFeeRet,
int &  nChangePosInOut,
std::string &  strFailReason,
const CCoinControl coin_control,
bool  sign = true,
CAmount  nGasFee = 0,
bool  hasSender = false 
)

Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed.

Note
passing nChangePosInOut as -1 will result in setting a random position

Definition at line 2650 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::DelAddressBook ( const CTxDestination address)

Definition at line 3276 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const CTxOut & CWallet::FindNonChangeParentOutput ( const CTransaction tx,
int  output 
) const

Find non-change parent output.

Definition at line 2324 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::FundTransaction ( CMutableTransaction tx,
CAmount nFeeRet,
int &  nChangePosInOut,
std::string &  strFailReason,
bool  lockUnspents,
const std::set< int > &  setSubtractFeeFromOutputs,
CCoinControl  coinControl 
)

Insert additional inputs into the transaction by calling CreateTransaction();.

Definition at line 2586 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::set< CTxDestination > CWallet::GetAccountAddresses ( const std::string &  strAccount) const

Definition at line 3672 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const std::string & CWallet::GetAccountName ( const CScript scriptPubKey) const

Definition at line 3296 of file wallet.cpp.

Here is the call graph for this function:

std::map< CTxDestination, CAmount > CWallet::GetAddressBalances ( )

Definition at line 3539 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::set< std::set< CTxDestination > > CWallet::GetAddressGroupings ( )

Definition at line 3579 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetAvailableBalance ( const CCoinControl coinControl = nullptr) const

Definition at line 2152 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetBalance ( ) const

Definition at line 2019 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetImmatureBalance ( ) const

Definition at line 2050 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetImmatureWatchOnlyBalance ( ) const

Definition at line 2095 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::GetKeyFromPool ( CPubKey key,
bool  internal = false 
)

Definition at line 3490 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetLegacyBalance ( const isminefilter filter,
int  minDepth,
const std::string *  account 
) const

Definition at line 2115 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetMinimumFee ( unsigned int  nTxBytes,
const CCoinControl coin_control,
const CTxMemPool pool,
const CBlockPolicyEstimator estimator,
FeeCalculation feeCalc 
)
static

Estimate the minimum fee considering user set parameters and the required fee.

Definition at line 3114 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int64_t CWallet::GetOldestKeyPoolTime ( )

Definition at line 3524 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetRequiredFee ( unsigned int  nTxBytes)
static

Return the minimum required fee taking into account the floating relay fee and user set minimum transaction fee.

Definition at line 3109 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CReserveKey::GetReservedKey ( CPubKey pubkey,
bool  internal = false 
)

Definition at line 3686 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::GetScriptForMining ( std::shared_ptr< CReserveScript > &  script)
virtual

Reimplemented from CValidationInterface.

Definition at line 3744 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetUnconfirmedBalance ( ) const

Definition at line 2035 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetUnconfirmedWatchOnlyBalance ( ) const

Definition at line 2080 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CAmount CWallet::GetWatchOnlyBalance ( ) const

Definition at line 2064 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::IsLockedCoin ( uint256  hash,
unsigned int  n 
) const

Definition at line 3773 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::KeepKey ( int64_t  nIndex)

Definition at line 3467 of file wallet.cpp.

Here is the call graph for this function:

void CReserveKey::KeepKey ( )

Definition at line 3704 of file wallet.cpp.

Here is the caller graph for this function:

size_t CWallet::KeypoolCountExternalKeys ( )

Definition at line 3349 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::ListAccountCreditDebit ( const std::string &  strAccount,
std::list< CAccountingEntry > &  entries 
)

Definition at line 3084 of file wallet.cpp.

Here is the call graph for this function:

std::map< CTxDestination, std::vector< COutput > > CWallet::ListCoins ( ) const

Return list of available coins and locked coins grouped by non-change output address.

Definition at line 2278 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::ListLockedCoins ( std::vector< COutPoint > &  vOutpts) const

Definition at line 3781 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::LoadKeyPool ( int64_t  nIndex,
const CKeyPool keypool 
)

Definition at line 3355 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

DBErrors CWallet::LoadWallet ( bool &  fFirstRunRet)

Definition at line 3175 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::LockCoin ( const COutPoint output)

Definition at line 3755 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::MarkReserveKeysAsUsed ( int64_t  keypool_id)

Marks all keys in the keypool up to and including reserve_key as used.

Definition at line 3721 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::NewKeyPool ( )

Mark old keypool keys as used, and generate all new keys.

Definition at line 3323 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ReserveKeyFromKeyPool ( int64_t &  nIndex,
CKeyPool keypool,
bool  fRequestedInternal 
)

Definition at line 3429 of file wallet.cpp.

Here is the call graph for this function:

void CWallet::ReturnKey ( int64_t  nIndex,
bool  fInternal,
const CPubKey pubkey 
)

Definition at line 3475 of file wallet.cpp.

Here is the call graph for this function:

void CReserveKey::ReturnKey ( )

Definition at line 3712 of file wallet.cpp.

Here is the caller graph for this function:

bool CWallet::SelectCoins ( const std::vector< COutput > &  vAvailableCoins,
const CAmount nTargetValue,
std::set< CInputCoin > &  setCoinsRet,
CAmount nValueRet,
const CCoinControl coinControl = nullptr 
) const
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 2493 of file wallet.cpp.

Here is the call graph for this function:

bool CWallet::SelectCoinsMinConf ( const CAmount nTargetValue,
int  nConfMine,
int  nConfTheirs,
uint64_t  nMaxAncestors,
std::vector< COutput vCoins,
std::set< CInputCoin > &  setCoinsRet,
CAmount nValueRet 
) 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 2387 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SetAddressBook ( const CTxDestination address,
const std::string &  strName,
const std::string &  purpose 
)

Definition at line 3258 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SetDefaultKey ( const CPubKey vchPubKey)

Definition at line 3311 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::SignTransaction ( CMutableTransaction tx)

Definition at line 2562 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CWallet::TopUpKeyPool ( unsigned int  kpSize = 0)

Definition at line 3374 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CWallet::UnlockAllCoins ( )

Definition at line 3767 of file wallet.cpp.

Here is the caller graph for this function:

void CWallet::UnlockCoin ( const COutPoint output)

Definition at line 3761 of file wallet.cpp.

Here is the caller graph for this function:

DBErrors CWallet::ZapSelectTx ( std::vector< uint256 > &  vHashIn,
std::vector< uint256 > &  vHashOut 
)

Definition at line 3203 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

DBErrors CWallet::ZapWalletTx ( std::vector< CWalletTx > &  vWtx)

Definition at line 3233 of file wallet.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: