diff --git a/src/validation.cpp b/src/validation.cpp index 9514e6c0d72..a1ac4e1e145 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -696,7 +696,7 @@ private: // cache - should only be called after successful validation of all transactions in the package. // Does not call LimitMempoolSize(), so mempool max_size_bytes may be temporarily exceeded. bool SubmitPackage(const ATMPArgs& args, std::vector& workspaces, PackageValidationState& package_state, - std::map& results) + std::map& results) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_pool.cs); // Compare a package's feerate against minimum allowed. @@ -1338,7 +1338,7 @@ void MemPoolAccept::FinalizeSubpackage(const ATMPArgs& args) bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector& workspaces, PackageValidationState& package_state, - std::map& results) + std::map& results) { AssertLockHeld(cs_main); AssertLockHeld(m_pool.cs); @@ -1512,7 +1512,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std:: workspaces.reserve(txns.size()); std::transform(txns.cbegin(), txns.cend(), std::back_inserter(workspaces), [](const auto& tx) { return Workspace(tx); }); - std::map results; + std::map results; LOCK(m_pool.cs); @@ -1751,11 +1751,11 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptPackage(const Package& package, LOCK(m_pool.cs); // Stores results from which we will create the returned PackageMempoolAcceptResult. // A result may be changed if a mempool transaction is evicted later due to LimitMempoolSize(). - std::map results_final; + std::map results_final; // Results from individual validation which will be returned if no other result is available for // this transaction. "Nonfinal" because if a transaction fails by itself but succeeds later // (i.e. when evaluated with a fee-bumping child), the result in this map may be discarded. - std::map individual_results_nonfinal; + std::map individual_results_nonfinal; // Tracks whether we think package submission could result in successful entry to the mempool bool quit_early{false}; std::vector txns_package_eval; diff --git a/src/validation.h b/src/validation.h index 9e4fdbe6809..f6cbee28fc5 100644 --- a/src/validation.h +++ b/src/validation.h @@ -154,7 +154,7 @@ struct MempoolAcceptResult { const std::optional> m_wtxids_fee_calculations; /** The wtxid of the transaction in the mempool which has the same txid but different witness. */ - const std::optional m_other_wtxid; + const std::optional m_other_wtxid; static MempoolAcceptResult Failure(TxValidationState state) { return MempoolAcceptResult(state); @@ -179,7 +179,7 @@ struct MempoolAcceptResult { return MempoolAcceptResult(vsize, fees); } - static MempoolAcceptResult MempoolTxDifferentWitness(const uint256& other_wtxid) { + static MempoolAcceptResult MempoolTxDifferentWitness(const Wtxid& other_wtxid) { return MempoolAcceptResult(other_wtxid); } @@ -218,7 +218,7 @@ private: : m_result_type(ResultType::MEMPOOL_ENTRY), m_vsize{vsize}, m_base_fees(fees) {} /** Constructor for witness-swapped case. */ - explicit MempoolAcceptResult(const uint256& other_wtxid) + explicit MempoolAcceptResult(const Wtxid& other_wtxid) : m_result_type(ResultType::DIFFERENT_WITNESS), m_other_wtxid(other_wtxid) {} }; @@ -234,18 +234,18 @@ struct PackageMempoolAcceptResult * 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 m_tx_results; + std::map m_tx_results; explicit PackageMempoolAcceptResult(PackageValidationState state, - std::map&& results) + std::map&& results) : m_state{state}, m_tx_results(std::move(results)) {} explicit PackageMempoolAcceptResult(PackageValidationState state, CFeeRate feerate, - std::map&& results) + std::map&& results) : m_state{state}, m_tx_results(std::move(results)) {} /** Constructor to create a PackageMempoolAcceptResult from a single MempoolAcceptResult */ - explicit PackageMempoolAcceptResult(const uint256& wtxid, const MempoolAcceptResult& result) + explicit PackageMempoolAcceptResult(const Wtxid& wtxid, const MempoolAcceptResult& result) : m_tx_results{ {wtxid, result} } {} };