| 4463 | } |
| 4464 | |
| 4465 | MempoolAcceptResult ChainstateManager::ProcessTransaction(const CTransactionRef& tx, bool test_accept) |
| 4466 | { |
| 4467 | AssertLockHeld(cs_main); |
| 4468 | Chainstate& active_chainstate = ActiveChainstate(); |
| 4469 | if (!active_chainstate.GetMempool()) { |
| 4470 | TxValidationState state; |
| 4471 | state.Invalid(TxValidationResult::TX_NO_MEMPOOL, "no-mempool"); |
| 4472 | return MempoolAcceptResult::Failure(state); |
| 4473 | } |
| 4474 | auto result = AcceptToMemoryPool(active_chainstate, tx, GetTime(), /*bypass_limits=*/ false, test_accept); |
| 4475 | active_chainstate.GetMempool()->check(active_chainstate.CoinsTip(), active_chainstate.m_chain.Height() + 1); |
| 4476 | return result; |
| 4477 | } |
| 4478 | |
| 4479 | |
| 4480 | BlockValidationState TestBlockValidity( |