aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-02-10 15:47:06 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-02-10 19:59:01 +0100
commit13299630013411b1a9c77d2332f9d2d45eacde0f (patch)
treeac0a44b0089925f94eff8877ce9bf7527d609ecd /src
parent00ec73e062cac5b23bc99a0010fc9ce6cd20b99e (diff)
downloadbitcoin-13299630013411b1a9c77d2332f9d2d45eacde0f.tar.xz
Update the wallet best block marker when pruning
Github-Pull: #7502 Rebased-From: e4eebb604e19f67b0c7a483b1ded1229d75ecdd3
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 63517d54cf..5b27698d8b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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;