aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorlsilva01 <lsilva01@protonmail.com>2021-12-02 01:50:27 -0300
committerlsilva01 <lsilva01@protonmail.com>2021-12-07 18:56:29 -0300
commitf1f10c0514fe81318c8b064f9dad0e2f9a2cd037 (patch)
tree623a27c461312cfd878f4cdadecd41a6caaa778e /src/validation.h
parentdf562d698a386166ef93d03326c0480ea9bc11fe (diff)
Remove CTxMemPool params from ATMP
Co-authored-by: John Newbery <1063656+jnewbery@users.noreply.github.com> Co-authored-by: Jon Atack <jon@atack.com>
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/validation.h b/src/validation.h
index 881438f37a..9e79adfd72 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -211,18 +211,16 @@ struct PackageMempoolAcceptResult
* Try to add a transaction to the mempool. This is an internal function and is exposed only for testing.
* Client code should use ChainstateManager::ProcessTransaction()
*
- * @param[in] pool Reference to the node's mempool.
* @param[in] active_chainstate Reference to the active chainstate.
* @param[in] tx The transaction to submit for mempool acceptance.
- * @param[in] accept_time The timestamp for adding the transaction to the mempool. Usually
- * the current system time, but may be different.
+ * @param[in] accept_time The timestamp for adding the transaction to the mempool.
* It is also used to determine when the entry expires.
* @param[in] bypass_limits When true, don't enforce mempool fee and capacity limits.
* @param[in] test_accept When true, run validation checks but don't submit to mempool.
*
* @returns a MempoolAcceptResult indicating whether the transaction was accepted/rejected with reason.
*/
-MempoolAcceptResult AcceptToMemoryPool(CTxMemPool& pool, CChainState& active_chainstate, const CTransactionRef& tx,
+MempoolAcceptResult AcceptToMemoryPool(CChainState& active_chainstate, const CTransactionRef& tx,
int64_t accept_time, bool bypass_limits, bool test_accept)
EXCLUSIVE_LOCKS_REQUIRED(cs_main);
@@ -656,6 +654,12 @@ public:
return m_coins_views->m_dbview;
}
+ //! @returns A pointer to the mempool.
+ CTxMemPool* GetMempool()
+ {
+ return m_mempool;
+ }
+
//! @returns A reference to a wrapped view of the in-memory UTXO set that
//! handles disk read errors gracefully.
CCoinsViewErrorCatcher& CoinsErrorCatcher() EXCLUSIVE_LOCKS_REQUIRED(cs_main)