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.
INVALID, //!> Invalid.
};
ResultType m_result_type;
TxValidationState m_state;
const ResultType m_result_type;
const TxValidationState m_state;
// The following fields are only present when m_result_type = ResultType::VALID
/** Raw base fees. */
std::optional<CAmount> m_base_fees;
/** Raw base fees in satoshis. */
const std::optional<CAmount> m_base_fees;
/** Constructor for failure case */
explicit MempoolAcceptResult(TxValidationState state)
@ -249,7 +249,7 @@ struct MempoolAcceptResult {
/** Constructor for success case */
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) {}
};
/**