mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
refactoring: FlushStateToDisk -> CChainState
Also renames global methods for clarity: - ::FlushStateToDisk() -> CChainState::ForceFlushStateToDisk() - This performs an unconditional flush. - ::PruneAndFlush() -> CChainState::PruneAndFlush()
This commit is contained in:
@@ -259,7 +259,7 @@ void Shutdown(InitInterfaces& interfaces)
|
||||
|
||||
// FlushStateToDisk generates a ChainStateFlushed callback, which we should avoid missing
|
||||
if (pcoinsTip != nullptr) {
|
||||
FlushStateToDisk();
|
||||
::ChainstateActive().ForceFlushStateToDisk();
|
||||
}
|
||||
|
||||
// After there are no more peers/RPC left to give us new data which may generate
|
||||
@@ -275,7 +275,7 @@ void Shutdown(InitInterfaces& interfaces)
|
||||
{
|
||||
LOCK(cs_main);
|
||||
if (pcoinsTip != nullptr) {
|
||||
FlushStateToDisk();
|
||||
::ChainstateActive().ForceFlushStateToDisk();
|
||||
}
|
||||
pcoinsTip.reset();
|
||||
pcoinscatcher.reset();
|
||||
@@ -1692,7 +1692,7 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||
nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK);
|
||||
if (!fReindex) {
|
||||
uiInterface.InitMessage(_("Pruning blockstore..."));
|
||||
PruneAndFlush();
|
||||
::ChainstateActive().PruneAndFlush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user