diff options
author | Carl Dong <contact@carldong.me> | 2022-03-18 12:22:34 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-04-12 14:37:27 -0400 |
commit | 5d670173a32ccdcb25d3a6bf97317f0ac774e0ed (patch) | |
tree | 20d3ffdc419c8dd24221b5785e02ac523aa2bee1 /src/node | |
parent | 2b5a741e98f186e50d9fbe1ceadcc8b8c91547f7 (diff) |
validation: Load pindexBestHeader in ChainMan
Now BlockManager::LoadBlockIndex() will ACTUALLY only load BlockMan
members.
[META] In a later commit, pindexBestHeader will be moved to ChainMan as
a member
-----
Code Reviewer Notes
Call graph of relevant functions:
ChainstateManager::LoadBlockIndex() <-- Moved to
calls BlockManager::LoadBlockIndexDB()
which calls BlockManager::LoadBlockIndex() <-- Moved from
There is only one call to each of inner functions, meaning that no
behavior is changing.
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/blockstorage.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 763fd29744..45e7ca4796 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -285,8 +285,6 @@ bool BlockManager::LoadBlockIndex(const Consensus::Params& consensus_params) if (pindex->pprev) { pindex->BuildSkip(); } - if (pindex->IsValid(BLOCK_VALID_TREE) && (pindexBestHeader == nullptr || CBlockIndexWorkComparator()(pindexBestHeader, pindex))) - pindexBestHeader = pindex; } return true; |