aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglozow <gzhao408@berkeley.edu>2021-02-11 06:23:04 -0800
committerglozow <gzhao408@berkeley.edu>2021-04-26 05:24:32 -0700
commit363df758a9e0b5e0aa5ab401de2de820fc362c19 (patch)
tree4911b8c779e7a05b4f7d3f7b11af69d52e165cfa
parent0dd7b234895b02bfc512ae83bd77b581c861d6e9 (diff)
doc/style followups in MempoolAcceptResult
-rw-r--r--src/validation.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/validation.h b/src/validation.h
index de121ab46a..29fb22ff4b 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -195,14 +195,14 @@ 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
/** Mempool transactions replaced by the tx per BIP 125 rules. */
- std::optional<std::list<CTransactionRef>> m_replaced_transactions;
- /** Raw base fees. */
- std::optional<CAmount> m_base_fees;
+ const std::optional<std::list<CTransactionRef>> m_replaced_transactions;
+ /** Raw base fees in satoshis. */
+ const std::optional<CAmount> m_base_fees;
/** Constructor for failure case */
explicit MempoolAcceptResult(TxValidationState state)
@@ -212,7 +212,7 @@ struct MempoolAcceptResult {
/** Constructor for success case */
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) {}
};