merge bitcoin#21783: Make MempoolAcceptResult members const

This commit is contained in:
Kittywhiskers Van Gogh 2021-02-11 06:23:04 -08:00 committed by pasta
parent 6238ed2c6e
commit 0d76475dab
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -234,12 +234,12 @@ 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
/** 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)
@ -249,7 +249,7 @@ struct MempoolAcceptResult {
/** Constructor for success case */ /** Constructor for success case */
explicit MempoolAcceptResult(CAmount fees) explicit MempoolAcceptResult(CAmount fees)
: m_result_type(ResultType::VALID), m_state(TxValidationState{}), m_base_fees(fees) {} : m_result_type(ResultType::VALID), m_base_fees(fees) {}
}; };
/** /**