mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02: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:
parent
4d6688603b
commit
3ccbc376dd
4 changed files with 52 additions and 35 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue