Bitcoin Core  21.99.0
P2P Digital Currency
Functions | Variables
spend.cpp File Reference
#include <consensus/validation.h>
#include <interfaces/chain.h>
#include <policy/policy.h>
#include <util/check.h>
#include <util/fees.h>
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
#include <wallet/fees.h>
#include <wallet/receive.h>
#include <wallet/spend.h>
#include <wallet/transaction.h>
#include <wallet/wallet.h>
Include dependency graph for spend.cpp:

Go to the source code of this file.

Functions

int CalculateMaximumSignedInputSize (const CTxOut &txout, const CWallet *wallet, bool use_max_sig)
 
TxSize CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, const std::vector< CTxOut > &txouts, bool use_max_sig)
 
TxSize CalculateMaximumSignedTxSize (const CTransaction &tx, const CWallet *wallet, bool use_max_sig)
 Calculate the size of the transaction assuming all signatures are max size Use DummySignatureCreator, which inserts 71 byte signatures everywhere. More...
 
static bool IsCurrentForAntiFeeSniping (interfaces::Chain &chain, const uint256 &block_hash)
 
static uint32_t GetLocktimeForNewTransaction (interfaces::Chain &chain, const uint256 &block_hash, int block_height)
 Return a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain. More...
 

Variables

static constexpr size_t OUTPUT_GROUP_MAX_ENTRIES {100}
 

Function Documentation

◆ CalculateMaximumSignedInputSize()

int CalculateMaximumSignedInputSize ( const CTxOut txout,
const CWallet wallet,
bool  use_max_sig 
)

Definition at line 29 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateMaximumSignedTxSize() [1/2]

TxSize CalculateMaximumSignedTxSize ( const CTransaction tx,
const CWallet wallet,
bool  use_max_sig = false 
) -> cs_wallet)

Calculate the size of the transaction assuming all signatures are max size Use DummySignatureCreator, which inserts 71 byte signatures everywhere.

NOTE: this requires that all inputs must be in mapWallet (eg the tx should be IsAllFromMe).

Definition at line 52 of file spend.cpp.

Here is the call graph for this function:

◆ CalculateMaximumSignedTxSize() [2/2]

TxSize CalculateMaximumSignedTxSize ( const CTransaction tx,
const CWallet wallet,
const std::vector< CTxOut > &  txouts,
bool  use_max_sig 
)

Definition at line 40 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLocktimeForNewTransaction()

static uint32_t GetLocktimeForNewTransaction ( interfaces::Chain chain,
const uint256 block_hash,
int  block_height 
)
static

Return a height-based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain.

Definition at line 529 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCurrentForAntiFeeSniping()

static bool IsCurrentForAntiFeeSniping ( interfaces::Chain chain,
const uint256 block_hash 
)
static

Definition at line 511 of file spend.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ OUTPUT_GROUP_MAX_ENTRIES

constexpr size_t OUTPUT_GROUP_MAX_ENTRIES {100}
staticconstexpr

Definition at line 22 of file spend.cpp.