aboutsummaryrefslogtreecommitdiff
path: root/src/node/interfaces.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-23 18:07:00 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-15 17:45:48 +0100
commitfa3d62cf7b3501a056b34c5458c14d2fe6a55bd7 (patch)
tree36896fec7741ad366d51a3f857ef801124c7f731 /src/node/interfaces.cpp
parentc09b41dc665bcc7d6dcc464f1d279e8eca598c8d (diff)
downloadbitcoin-fa3d62cf7b3501a056b34c5458c14d2fe6a55bd7.tar.xz
Move FindForkInGlobalIndex from BlockManager to CChainState
The helper was moved in commit b026e318c39f59a06e29f1b25c7f577e01b25ccb, which also mentioned that it could be moved to CChainState. So do that, as the functionality is not block-storage related. This also allows to drop one function argument.
Diffstat (limited to 'src/node/interfaces.cpp')
-rw-r--r--src/node/interfaces.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
index 075842ef73..8109dce2c0 100644
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -494,8 +494,8 @@ public:
std::optional<int> findLocatorFork(const CBlockLocator& locator) override
{
LOCK(cs_main);
- const CChain& active = Assert(m_node.chainman)->ActiveChain();
- if (CBlockIndex* fork = m_node.chainman->m_blockman.FindForkInGlobalIndex(active, locator)) {
+ const CChainState& active = Assert(m_node.chainman)->ActiveChainstate();
+ if (CBlockIndex* fork = active.FindForkInGlobalIndex(locator)) {
return fork->nHeight;
}
return std::nullopt;