Merge #7502: Update the wallet best block marker when pruning

e4eebb6 Update the wallet best block marker when pruning (Pieter Wuille)
This commit is contained in:
Wladimir J. van der Laan 2016-02-10 19:39:33 +01:00
commit b93f078496
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 1 additions and 1 deletions

View File

@ -2262,7 +2262,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
return AbortNode(state, "Failed to write to coin database");
nLastFlush = nNow;
}
if ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000) {
if (fDoFullFlush || ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000)) {
// Update best block in wallet (so we can detect restored wallets).
GetMainSignals().SetBestChain(chainActive.GetLocator());
nLastSetChain = nNow;