diff options
author | glozow <gloriajzhao@gmail.com> | 2023-08-10 11:47:56 +0100 |
---|---|---|
committer | glozow <gloriajzhao@gmail.com> | 2023-09-13 16:14:17 +0100 |
commit | 8ad7ad33929ee846a55a43c55732be0cb8973060 (patch) | |
tree | 0bb6571cd53ba32ce532de76d40eeaa2a9f14989 /src/validation.h | |
parent | 03b87c11ca0705e1d6147b90da33ce555f9f41c8 (diff) |
[validation] make PackageMempoolAcceptResult members mutable
After the PackageMempoolAcceptResult is returned from
AcceptMultipleTransactions, leave room for results to change due to
LimitMempool() eviction.
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/validation.h b/src/validation.h index d7ad86a5e8..aacc693300 100644 --- a/src/validation.h +++ b/src/validation.h @@ -211,21 +211,21 @@ private: */ struct PackageMempoolAcceptResult { - const PackageValidationState m_state; + PackageValidationState m_state; /** * Map from wtxid to finished MempoolAcceptResults. The client is responsible * for keeping track of the transaction objects themselves. If a result is not * present, it means validation was unfinished for that transaction. If there * was a package-wide error (see result in m_state), m_tx_results will be empty. */ - std::map<const uint256, const MempoolAcceptResult> m_tx_results; + std::map<uint256, MempoolAcceptResult> m_tx_results; explicit PackageMempoolAcceptResult(PackageValidationState state, - std::map<const uint256, const MempoolAcceptResult>&& results) + std::map<uint256, MempoolAcceptResult>&& results) : m_state{state}, m_tx_results(std::move(results)) {} explicit PackageMempoolAcceptResult(PackageValidationState state, CFeeRate feerate, - std::map<const uint256, const MempoolAcceptResult>&& results) + std::map<uint256, MempoolAcceptResult>&& results) : m_state{state}, m_tx_results(std::move(results)) {} /** Constructor to create a PackageMempoolAcceptResult from a single MempoolAcceptResult */ |