HomePhabricator

[validation] Add CChainStateManager::ProcessTransaction() and use it outsideā€¦

Description

[validation] Add CChainStateManager::ProcessTransaction() and use it outside validation

Summary:
Also add a new transaction validation failure reason TX_NO_MEMPOOL to indicate that there is no mempool.

This is a backport of core#23173
https://github.com/bitcoin/bitcoin/pull/23173/commits/92a3aeecf6a82e9cbc9fda11022b0548efd24d05
https://github.com/bitcoin/bitcoin/pull/23173/commits/2c64270bbe523ef87e7225c351464e7c716f0b3e

Note: due to D1667, there are calls to AcceptToMemoryPool in DisconnectedBlockTransactions::updateMempoolForReorg that cannot access the chain manager.
However updateMempoolForReorg is only called from within validation.cpp, so it should not be a problem.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12235

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Sep 27 2021, 15:55
PiRKCommitted on Oct 13 2022, 16:22
PiRKPushed on Oct 13 2022, 16:22
Reviewer
Restricted Project
Differential Revision
D12235: [validation] Add CChainStateManager::ProcessTransaction() and use it outside validation
Parents
rABC2096754c7ddd: [logging/documentation] Remove reference to AcceptToMemoryPool from error string
Branches
Unknown
Tags
Unknown