refactor: Pass chainstate parameters to MaybeCompleteSnapshotValidation
Remove hardcoded references to m_ibd_chainstate and m_snapshot_chainstate so MaybeCompleteSnapshotValidation function can be simpler and focus on validating the snapshot without dealing with internal ChainstateManager states. This is a step towards being able to validate the snapshot outside of ActivateBestChain loop so cs_main is not locked for minutes when the snapshot block is connected.
This commit is contained in:
1 parent
1598a15aed
commit
840bd2ef23
8 files changed
+93
-110
No files matched your search
@@ -63,7 +63,7 @@ chainstate and a sync to tip begins. A new chainstate directory is created in th
|
||||
datadir for the snapshot chainstate called `chainstate_snapshot`.
|
||||
|
||||
When this directory is present in the datadir, the snapshot chainstate will be detected
|
||||
and loaded as active on node startup (via `DetectSnapshotChainstate()`).
|
||||
and loaded as active on node startup (via `LoadAssumeutxoChainstate()`).
|
||||
|
||||
A special file is created within that directory, `base_blockhash`, which contains the
|
||||
serialized `uint256` of the base block of the snapshot. This is used to reinitialize
|
||||
|
||||
Reference in new issue
Block a user