Page MenuHomePhabricator

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

Authored by PiRK on Oct 13 2022, 08:50.

Details

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

Event Timeline

PiRK requested review of this revision.Oct 13 2022, 08:50
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.h
338

config is missing

This revision is now accepted and ready to land.Oct 13 2022, 14:30

add doxygen doc for config param