Page MenuHomePhabricator

[refactor] pass coinsview and height to check()
ClosedPublic

Authored by PiRK on Oct 7 2022, 09:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCc8b5a158b441: [refactor] pass coinsview and height to check()
Summary

Removes check's dependency on validation.h. This is a step towards removing the txmempool --> validation circular dependency.

From the PR's description:

There are two functions in txmempool that need validation right now: check() and removeForReorg(). This PR removes the dependencies in check().

This concludes backport of core#23157 [8/8]
https://github.com/bitcoin/bitcoin/pull/23157/commits/082c5bf099c64e3d27abe9b68a71ce500b693e7e#diff-6875de769e90cec84d2e8a9c1b962cdbcda44d870d42e4215827e599e11e90e3

Depends on D12173

The fuzzer change is not applicable due to missing backports.

Test Plan

ninja all check-all bench-bitcoin

Event Timeline

PiRK requested review of this revision.Oct 7 2022, 09:28
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.cpp
2834

We are missing a check if (m_mempool) here, can you check what backport is missing ?

This revision is now accepted and ready to land.Oct 7 2022, 10:22
src/validation.cpp
2834

https://github.com/bitcoin/bitcoin/pull/22415
Make m_mempool optional in CChainState