mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
refactor: move RewindBlockIndex to CChainState
This is in preparation for multiple chainstate initialization in init.
This commit is contained in:
committed by
James O'Beirne
parent
89cdf4d569
commit
5b690f0aae
@@ -1614,7 +1614,7 @@ bool AppInitMain(NodeContext& node)
|
||||
// It both disconnects blocks based on ::ChainActive(), and drops block data in
|
||||
// BlockIndex() based on lack of available witness data.
|
||||
uiInterface.InitMessage(_("Rewinding blocks...").translated);
|
||||
if (!RewindBlockIndex(chainparams)) {
|
||||
if (!::ChainstateActive().RewindBlockIndex(chainparams)) {
|
||||
strLoadError = _("Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain").translated;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user