| 5135 | } |
| 5136 | |
| 5137 | MempoolAcceptResult |
| 5138 | ChainstateManager::ProcessTransaction(const CTransactionRef &tx, |
| 5139 | bool test_accept) { |
| 5140 | AssertLockHeld(cs_main); |
| 5141 | Chainstate &active_chainstate = ActiveChainstate(); |
| 5142 | if (!active_chainstate.GetMempool()) { |
| 5143 | TxValidationState state; |
| 5144 | state.Invalid(TxValidationResult::TX_NO_MEMPOOL, "no-mempool"); |
| 5145 | return MempoolAcceptResult::Failure(state); |
| 5146 | } |
| 5147 | auto result = AcceptToMemoryPool(active_chainstate, tx, GetTime(), |
| 5148 | /*bypass_limits=*/false, test_accept); |
| 5149 | active_chainstate.GetMempool()->check( |
| 5150 | active_chainstate.CoinsTip(), active_chainstate.m_chain.Height() + 1); |
| 5151 | return result; |
| 5152 | } |
| 5153 | |
| 5154 | bool TestBlockValidity( |
| 5155 | BlockValidationState &state, const CChainParams ¶ms, |