Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Enumerations | Functions
Consensus Namespace Reference

Transaction validation functions. More...

Classes

struct  BIP9Deployment
 Struct for each individual consensus rule change using BIP9. More...
 
struct  Params
 Parameters that influence chain consensus. More...
 

Enumerations

enum  BuriedDeployment : int16_t {
  DEPLOYMENT_HEIGHTINCB = std::numeric_limits<int16_t>::min() , DEPLOYMENT_CLTV , DEPLOYMENT_DERSIG , DEPLOYMENT_CSV ,
  DEPLOYMENT_SEGWIT
}
 A buried deployment is one where the height of the activation has been hardcoded into the client implementation long after the consensus change has activated. More...
 
enum  DeploymentPos : uint16_t { DEPLOYMENT_TESTDUMMY , DEPLOYMENT_TAPROOT , MAX_VERSION_BITS_DEPLOYMENTS }
 

Functions

constexpr bool ValidDeployment (BuriedDeployment dep)
 
constexpr bool ValidDeployment (DeploymentPos dep)
 
bool CheckTxInputs (const CTransaction &tx, TxValidationState &state, const CCoinsViewCache &inputs, int nSpendHeight, CAmount &txfee)
 Check whether all inputs of this transaction are valid (no double spends and amounts) This does not modify the UTXO set. More...
 

Detailed Description

Transaction validation functions.

Enumeration Type Documentation

◆ BuriedDeployment

A buried deployment is one where the height of the activation has been hardcoded into the client implementation long after the consensus change has activated.

See BIP 90.

Enumerator
DEPLOYMENT_HEIGHTINCB 
DEPLOYMENT_CLTV 
DEPLOYMENT_DERSIG 
DEPLOYMENT_CSV 
DEPLOYMENT_SEGWIT 

Definition at line 22 of file params.h.

◆ DeploymentPos

enum Consensus::DeploymentPos : uint16_t
Enumerator
DEPLOYMENT_TESTDUMMY 
DEPLOYMENT_TAPROOT 
MAX_VERSION_BITS_DEPLOYMENTS 

Definition at line 32 of file params.h.

Function Documentation

◆ CheckTxInputs()

bool Consensus::CheckTxInputs ( const CTransaction tx,
TxValidationState state,
const CCoinsViewCache inputs,
int  nSpendHeight,
CAmount txfee 
)

Check whether all inputs of this transaction are valid (no double spends and amounts) This does not modify the UTXO set.

This does not check scripts and sigs.

Parameters
[out]txfeeSet to the transaction fee if successful. Preconditions: tx.IsCoinBase() is false.

Definition at line 168 of file tx_verify.cpp.

Here is the call graph for this function:

◆ ValidDeployment() [1/2]

constexpr bool Consensus::ValidDeployment ( BuriedDeployment  dep)
constexpr

Definition at line 30 of file params.h.

Here is the caller graph for this function:

◆ ValidDeployment() [2/2]

constexpr bool Consensus::ValidDeployment ( DeploymentPos  dep)
constexpr

Definition at line 38 of file params.h.