Bitcoin ABC  0.26.3
P2P Digital Currency
Public Types | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
MempoolAcceptResult Struct Reference

Validation result for a single transaction mempool acceptance. More...

#include <validation.h>

Collaboration diagram for MempoolAcceptResult:
[legend]

Public Types

enum class  ResultType { VALID , INVALID , MEMPOOL_ENTRY }
 Used to indicate the results of mempool validation. More...
 

Static Public Member Functions

static MempoolAcceptResult Failure (TxValidationState state)
 
static MempoolAcceptResult Success (int64_t vsize, Amount fees)
 Constructor for success case. More...
 
static MempoolAcceptResult MempoolTx (int64_t vsize, Amount fees)
 Constructor for already-in-mempool case. More...
 

Public Attributes

const ResultType m_result_type
 
const TxValidationState m_state
 
const std::optional< int64_t > m_vsize
 Virtual size as used by the mempool, calculated using serialized size and sigchecks. More...
 
const std::optional< Amountm_base_fees
 Raw base fees in satoshis. More...
 

Private Member Functions

 MempoolAcceptResult (TxValidationState state)
 Constructor for failure case. More...
 
 MempoolAcceptResult (ResultType result_type, int64_t vsize, Amount fees)
 Generic constructor for success cases. More...
 

Detailed Description

Validation result for a single transaction mempool acceptance.

Definition at line 205 of file validation.h.

Member Enumeration Documentation

◆ ResultType

Used to indicate the results of mempool validation.

Enumerator
VALID 

Fully validated, valid.

INVALID 

Invalid.

MEMPOOL_ENTRY 

Valid, transaction was already in the mempool.

Definition at line 207 of file validation.h.

Constructor & Destructor Documentation

◆ MempoolAcceptResult() [1/2]

MempoolAcceptResult::MempoolAcceptResult ( TxValidationState  state)
inlineexplicitprivate

Constructor for failure case.

Definition at line 248 of file validation.h.

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

◆ MempoolAcceptResult() [2/2]

MempoolAcceptResult::MempoolAcceptResult ( ResultType  result_type,
int64_t  vsize,
Amount  fees 
)
inlineexplicitprivate

Generic constructor for success cases.

Definition at line 256 of file validation.h.

Member Function Documentation

◆ Failure()

static MempoolAcceptResult MempoolAcceptResult::Failure ( TxValidationState  state)
inlinestatic

Definition at line 227 of file validation.h.

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

◆ MempoolTx()

static MempoolAcceptResult MempoolAcceptResult::MempoolTx ( int64_t  vsize,
Amount  fees 
)
inlinestatic

Constructor for already-in-mempool case.

It wouldn't replace any transactions.

Definition at line 240 of file validation.h.

Here is the call graph for this function:

◆ Success()

static MempoolAcceptResult MempoolAcceptResult::Success ( int64_t  vsize,
Amount  fees 
)
inlinestatic

Constructor for success case.

Definition at line 232 of file validation.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_base_fees

const std::optional<Amount> MempoolAcceptResult::m_base_fees

Raw base fees in satoshis.

Definition at line 226 of file validation.h.

◆ m_result_type

const ResultType MempoolAcceptResult::m_result_type

Definition at line 215 of file validation.h.

◆ m_state

const TxValidationState MempoolAcceptResult::m_state

Definition at line 216 of file validation.h.

◆ m_vsize

const std::optional<int64_t> MempoolAcceptResult::m_vsize

Virtual size as used by the mempool, calculated using serialized size and sigchecks.

Definition at line 224 of file validation.h.


The documentation for this struct was generated from the following file: