Bitcoin ABC 0.30.7
P2P Digital Currency
Namespaces | Functions
tx_verify.cpp File Reference
#include <consensus/tx_verify.h>
#include <chain.h>
#include <coins.h>
#include <consensus/activation.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/params.h>
#include <consensus/validation.h>
#include <primitives/transaction.h>
#include <script/script_flags.h>
#include <util/check.h>
#include <util/moneystr.h>
#include <version.h>
Include dependency graph for tx_verify.cpp:

Go to the source code of this file.

Namespaces

namespace  Consensus
 

Functions

static bool IsFinalTx (const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
 
bool ContextualCheckTransaction (const Consensus::Params &params, const CTransaction &tx, TxValidationState &state, int nHeight, int64_t nMedianTimePast)
 Context dependent validity checks for non coinbase transactions. More...
 
std::pair< int, int64_t > CalculateSequenceLocks (const CTransaction &tx, int flags, std::vector< int > &prevHeights, const CBlockIndex &block)
 Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68. More...
 
bool EvaluateSequenceLocks (const CBlockIndex &block, std::pair< int, int64_t > lockPair)
 
bool SequenceLocks (const CTransaction &tx, int flags, std::vector< int > &prevHeights, const CBlockIndex &block)
 Check if transaction is final per BIP 68 sequence numbers and can be included in a block. More...
 
bool Consensus::CheckTxInputs (const CTransaction &tx, TxValidationState &state, const CCoinsViewCache &inputs, int nSpendHeight, Amount &txfee)
 Check whether all inputs of this transaction are valid (no double spends and amounts). More...
 

Function Documentation

◆ CalculateSequenceLocks()

std::pair< int, int64_t > CalculateSequenceLocks ( const CTransaction tx,
int  flags,
std::vector< int > &  prevHeights,
const CBlockIndex block 
)

Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68.

Also removes from the vector of input heights any entries which did not correspond to sequence locked inputs as they do not affect the calculation.

Definition at line 78 of file tx_verify.cpp.

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

◆ ContextualCheckTransaction()

bool ContextualCheckTransaction ( const Consensus::Params params,
const CTransaction tx,
TxValidationState state,
int  nHeight,
int64_t  nMedianTimePast 
)

Context dependent validity checks for non coinbase transactions.

This doesn't check the validity of the transaction against the UTXO set, but simply characteristic that are suceptible to change over time such as feature activation/deactivation and CLTV.

Definition at line 41 of file tx_verify.cpp.

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

◆ EvaluateSequenceLocks()

bool EvaluateSequenceLocks ( const CBlockIndex block,
std::pair< int, int64_t >  lockPair 
)

Definition at line 150 of file tx_verify.cpp.

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

◆ IsFinalTx()

static bool IsFinalTx ( const CTransaction tx,
int  nBlockHeight,
int64_t  nBlockTime 
)
static

Definition at line 20 of file tx_verify.cpp.

Here is the caller graph for this function:

◆ SequenceLocks()

bool SequenceLocks ( const CTransaction tx,
int  flags,
std::vector< int > &  prevHeights,
const CBlockIndex block 
)

Check if transaction is final per BIP 68 sequence numbers and can be included in a block.

Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed.

Definition at line 161 of file tx_verify.cpp.

Here is the call graph for this function: