0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-05 14:06:27 -05:00

doc/style followups in MempoolAcceptResult

This commit is contained in:
glozow 2021-02-11 06:23:04 -08:00
parent 0dd7b23489
commit 363df758a9

View file

@ -195,14 +195,14 @@ struct MempoolAcceptResult {
VALID, //!> Fully validated, valid. VALID, //!> Fully validated, valid.
INVALID, //!> Invalid. INVALID, //!> Invalid.
}; };
ResultType m_result_type; const ResultType m_result_type;
TxValidationState m_state; const TxValidationState m_state;
// The following fields are only present when m_result_type = ResultType::VALID // The following fields are only present when m_result_type = ResultType::VALID
/** Mempool transactions replaced by the tx per BIP 125 rules. */ /** Mempool transactions replaced by the tx per BIP 125 rules. */
std::optional<std::list<CTransactionRef>> m_replaced_transactions; const std::optional<std::list<CTransactionRef>> m_replaced_transactions;
/** Raw base fees. */ /** Raw base fees in satoshis. */
std::optional<CAmount> m_base_fees; const std::optional<CAmount> m_base_fees;
/** Constructor for failure case */ /** Constructor for failure case */
explicit MempoolAcceptResult(TxValidationState state) explicit MempoolAcceptResult(TxValidationState state)
@ -212,7 +212,7 @@ struct MempoolAcceptResult {
/** Constructor for success case */ /** Constructor for success case */
explicit MempoolAcceptResult(std::list<CTransactionRef>&& replaced_txns, CAmount fees) explicit MempoolAcceptResult(std::list<CTransactionRef>&& replaced_txns, CAmount fees)
: m_result_type(ResultType::VALID), m_state(TxValidationState{}), : m_result_type(ResultType::VALID),
m_replaced_transactions(std::move(replaced_txns)), m_base_fees(fees) {} m_replaced_transactions(std::move(replaced_txns)), m_base_fees(fees) {}
}; };