| 4197 | } |
| 4198 | |
| 4199 | MempoolAcceptResult ChainstateManager::ProcessTransaction(const CTransactionRef& tx, bool test_accept) |
| 4200 | { |
| 4201 | AssertLockHeld(cs_main); |
| 4202 | CChainState& active_chainstate = ActiveChainstate(); |
| 4203 | if (!active_chainstate.GetMempool()) { |
| 4204 | TxValidationState state; |
| 4205 | state.Invalid(TxValidationResult::TX_NO_MEMPOOL, "no-mempool"); |
| 4206 | return MempoolAcceptResult::Failure(state); |
| 4207 | } |
| 4208 | auto result = AcceptToMemoryPool(active_chainstate, tx, GetTime(), /*bypass_limits=*/ false, test_accept); |
| 4209 | active_chainstate.m_mempool->check(active_chainstate.m_chain.Tip(), active_chainstate.CoinsTip(), active_chainstate.m_chain.Height() + 1); |
| 4210 | return result; |
| 4211 | } |
| 4212 | |
| 4213 | bool TestBlockValidity(BlockValidationState& state, |
| 4214 | const CChainParams& chainparams, |