Permalink
Browse files

Update the wallet best block marker when pruning

Github-Pull: #7502
Rebased-From: e4eebb6
  • Loading branch information...
sipa authored and laanwj committed Feb 10, 2016
1 parent 00ec73e commit 13299630013411b1a9c77d2332f9d2d45eacde0f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main.cpp
View
@@ -2266,7 +2266,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;

0 comments on commit 1329963

Please sign in to comment.