mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-13 17:15:11 +01:00
use ChainstateManager to initialize chainstate
This allows us to easily initialize multiple chainstates on startup in future commits. It retires the g_chainstate global in lieu of g_chainman.
This commit is contained in:
committed by
James O'Beirne
parent
5b690f0aae
commit
4ae29f5f0c
@@ -1319,7 +1319,7 @@ static UniValue getchaintips(const JSONRPCRequest& request)
|
||||
/*
|
||||
* Idea: the set of chain tips is ::ChainActive().tip, plus orphan blocks which do not have another orphan building off of them.
|
||||
* Algorithm:
|
||||
* - Make one pass through g_blockman.m_block_index, picking out the orphan blocks, and also storing a set of the orphan block's pprev pointers.
|
||||
* - Make one pass through BlockIndex(), picking out the orphan blocks, and also storing a set of the orphan block's pprev pointers.
|
||||
* - Iterate through the orphan blocks. If the block isn't pointed to by another orphan, it is a chain tip.
|
||||
* - add ::ChainActive().Tip()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user