diff options
author | John Newbery <john@johnnewbery.com> | 2021-09-27 17:47:21 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-11-03 14:34:41 +0000 |
commit | 2c64270bbe523ef87e7225c351464e7c716f0b3e (patch) | |
tree | 9a19b873baba2b2ec407dcd9cace410c37fc49f7 /src/validation.h | |
parent | 92a3aeecf6a82e9cbc9fda11022b0548efd24d05 (diff) |
[refactor] Don't call AcceptToMemoryPool() from outside validation.cpp
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/validation.h b/src/validation.h index 096e609abe..71bbcbf0d4 100644 --- a/src/validation.h +++ b/src/validation.h @@ -206,9 +206,16 @@ struct PackageMempoolAcceptResult }; /** - * (Try to) add a transaction to the memory pool. - * @param[in] bypass_limits When true, don't enforce mempool fee limits. - * @param[in] test_accept When true, run validation checks but don't submit to mempool. + * 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] active_chainstate Reference to the active chainstate. + * @param[in] pool Reference to the node's mempool. + * @param[in] tx The transaction to submit for mempool acceptance. + * @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(CChainState& active_chainstate, CTxMemPool& pool, const CTransactionRef& tx, bool bypass_limits, bool test_accept=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main); |