diff options
author | Carl Dong <contact@carldong.me> | 2021-05-07 14:50:10 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-05-27 13:50:11 -0400 |
commit | 7a799c9c2b8652e780d1fd5e1bf7d05b026c1c1a (patch) | |
tree | 0ac4a71e632ab1ff1be8e37699ee7521b5917b9e /src/index | |
parent | db33cde80fff749c6adff9e91fca5f27f4bb6278 (diff) |
index: refactor-only: Reuse CChain ref
Diffstat (limited to 'src/index')
-rw-r--r-- | src/index/base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp index 88a66cc0d5..3a61af28b7 100644 --- a/src/index/base.cpp +++ b/src/index/base.cpp @@ -60,12 +60,12 @@ bool BaseIndex::Init() } LOCK(cs_main); + CChain& active_chain = m_chainstate->m_chain; if (locator.IsNull()) { m_best_block_index = nullptr; } else { - m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(m_chainstate->m_chain, locator); + m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(active_chain, locator); } - CChain& active_chain = m_chainstate->m_chain; m_synced = m_best_block_index.load() == active_chain.Tip(); if (!m_synced) { bool prune_violation = false; |