I get a lot of spurious messages like this in the log:
```
2019-08-31T18:07:53Z Synchronizing blockheaders, height: 592633 (~100.00%)
2019-08-31T18:09:40Z Synchronizing blockheaders, height: 592634 (~100.00%)
2019-08-31T18:09:40Z Synchronizing blockheaders, height: 592634 (~100.00%)
2019-08-31T18:09:40Z Synchronizing blockheaders, height: 592634 (~100.00%)
2019-08-31T18:09:40Z Synchronizing blockheaders, height: 592634 (~100.00%)
2019-08-31T18:09:40Z Synchronizing blockheaders, height: 592634 (~100.00%)
2019-08-31T18:10:28Z Synchronizing blockheaders, height: 592635 (~100.00%)
2019-08-31T18:10:28Z Synchronizing blockheaders, height: 592635 (~100.00%)
2019-08-31T18:10:28Z Synchronizing blockheaders, height: 592635 (~100.00%)
2019-08-31T18:10:28Z Synchronizing blockheaders, height: 592635 (~100.00%)
2019-08-31T18:10:28Z Synchronizing blockheaders, height: 592635 (~100.00%)
2019-08-31T18:11:01Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:11:01Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:11:01Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:11:01Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:11:01Z Synchronizing blockheaders, height: 592636 (~100.00%)
```
also
```
2019-08-31T18:19:47Z New outbound peer connected: version: 70015, blocks=592636, peer=0
2019-08-31T18:19:47Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:19:47Z New outbound peer connected: version: 70015, blocks=592636, peer=1
2019-08-31T18:19:48Z Synchronizing blockheaders, height: 592636 (~100.00%)
2019-08-31T18:19:48Z New outbound peer connected: version: 70015, blocks=592636, peer=2
2019-08-31T18:19:49Z Synchronizing blockheaders, height: 592636 (~100.00%)
```
This log message was introduced in #15615 by @jonasschnelli..
From what I understand, it's supposed to only be shown once per 2000 blocks, not multiple times for the same block.


CValidationState state;
    const CChainParams& chainparams = Params();
    if (!this->FlushStateToDisk(chainparams, state, FlushStateMode::ALWAYS)) {
        LogPrintf("%s: failed to flush state (%s)\n", __func__, FormatStateMessage(state));
    }
}
void CChainState::PruneAndFlush() {
    CValidationState state;
    fCheckForPruning = true;
    const CChainParams& chainparams = Params();
    if (!this->FlushStateToDisk(chainparams, state, FlushStateMode::NONE)) {
        LogPrintf("%s: failed to flush state (%s)\n", __func__, FormatStateMessage(state));
    }
}
static void DoWarning(const std::string& strWarning)
{
    static bool fWarned = false;
    SetMiscWarning(strWarning);
    if (!fWarned) {
        AlertNotify(strWarning);
        fWarned = true;
    }
}
static void AppendWarning(std::string& res, const std::string& warn)
{
    if (!res.empty()) res += ", ";
    res += warn;
}
void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainParams)
    EXCLUSIVE_LOCKS_REQUIRED(::cs_main)