Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Namespaces | Functions
spend.h File Reference
#include <consensus/amount.h>
#include <wallet/coinselection.h>
#include <wallet/transaction.h>
#include <wallet/wallet.h>
Include dependency graph for spend.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  wallet::COutput
struct  wallet::TxSize




int wallet::GetTxSpendSize (const CWallet &wallet, const CWalletTx &wtx, unsigned int out, bool use_max_sig=false)
 Get the marginal bytes if spending the specified output from this transaction. More...
int wallet::CalculateMaximumSignedInputSize (const CTxOut &txout, const CWallet *wallet, bool use_max_sig)
int wallet::CalculateMaximumSignedInputSize (const CTxOut &txout, const SigningProvider *provider, bool use_max_sig)
TxSize wallet::CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, const std::vector< CTxOut > &txouts, const CCoinControl *coin_control=nullptr)
 Calculate the size of the transaction assuming all signatures are max size Use DummySignatureCreator, which inserts 71 byte signatures everywhere. More...
TxSize wallet::CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, const CCoinControl *coin_control)
void wallet::AvailableCoins (const CWallet &wallet, std::vector< COutput > &vCoins, const CCoinControl *coinControl=nullptr, const CAmount &nMinimumAmount=1, const CAmount &nMaximumAmount=MAX_MONEY, const CAmount &nMinimumSumAmount=MAX_MONEY, const uint64_t nMaximumCount=0) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 populate vCoins with vector of available COutputs. More...
CAmount wallet::GetAvailableBalance (const CWallet &wallet, const CCoinControl *coinControl)
const CTxOutwallet::FindNonChangeParentOutput (const CWallet &wallet, const CTransaction &tx, int output) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Find non-change parent output. More...
std::map< CTxDestination, std::vector< COutput > > wallet::ListCoins (const CWallet &wallet) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Return list of available coins and locked coins grouped by non-change output address. More...
std::vector< OutputGroup > wallet::GroupOutputs (const CWallet &wallet, const std::vector< COutput > &outputs, const CoinSelectionParams &coin_sel_params, const CoinEligibilityFilter &filter, bool positive_only)
std::optional< SelectionResult > wallet::AttemptSelection (const CWallet &wallet, const CAmount &nTargetValue, const CoinEligibilityFilter &eligibility_filter, std::vector< COutput > coins, const CoinSelectionParams &coin_selection_params)
 Attempt to find a valid input set that meets the provided eligibility filter and target. More...
std::optional< SelectionResult > wallet::SelectCoins (const CWallet &wallet, const std::vector< COutput > &vAvailableCoins, const CAmount &nTargetValue, const CCoinControl &coin_control, const CoinSelectionParams &coin_selection_params) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 Select a set of coins such that nTargetValue is met and at least all coins from coin_control are selected; never select unconfirmed coins if they are not ours param@[in] wallet The wallet which provides data necessary to spend the selected coins param@[in] vAvailableCoins The vector of coins available to be spent param@[in] nTargetValue The target value param@[in] coin_selection_params Parameters for this coin selection such as feerates, whether to avoid partial spends, and whether to subtract the fee from the outputs. More...
bool wallet::CreateTransaction (CWallet &wallet, const std::vector< CRecipient > &vecSend, CTransactionRef &tx, CAmount &nFeeRet, int &nChangePosInOut, bilingual_str &error, const CCoinControl &coin_control, FeeCalculation &fee_calc_out, bool sign=true)
 Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed. More...
bool wallet::FundTransaction (CWallet &wallet, CMutableTransaction &tx, CAmount &nFeeRet, int &nChangePosInOut, bilingual_str &error, bool lockUnspents, const std::set< int > &setSubtractFeeFromOutputs, CCoinControl)
 Insert additional inputs into the transaction by calling CreateTransaction();. More...