HomePhabricator

[mempool] Make DisconnectedBlockTransactions responsible for removing txs from…

Description

[mempool] Make DisconnectedBlockTransactions responsible for removing txs from the mempool after a block is connected

Summary: Rather than having the mempool use the DisconnectedBlockTransactions class to remove the transactions, (CTxMemPool => DisconnectedBlockTransactions) we can reverse the logic and let the DisconnectedBlockTransactions manage the mempool (DisconnectedBlockTransactions => CTxMemPool). This is more consistent with the other pieces of code and will make it possible to break the circular dependency mempool.h -> validation.h (via DisconnectedBlockTransactions) -> mempool.h by changing it to validation.h -> disconnected_block_transactions.h -> mempool.h.

Test Plan:

ninja all check-extended

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Mar 26 2024, 10:52
FabienPushed on Mar 26 2024, 20:35
Reviewer
Restricted Project
Differential Revision
D15785: [mempool] Make DisconnectedBlockTransactions responsible for removing txs from the mempool after a block is connected
Parents
rABC5c5d6168a00d: Remove ::dustRelayFee global
Branches
Unknown
Tags
Unknown