diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2015-06-08 16:34:58 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2015-06-08 16:34:58 -0400 |
commit | 65b94545036ae6e38e79e9c7166a3ba1ddb83f66 (patch) | |
tree | 52cc4ffb2c8ecb667b41cc9fbbc51badb523a6ab /src/main.h | |
parent | 55294a9fb673ab0a7c99b9c18279fe12a5a07890 (diff) |
Use best header chain timestamps to detect partitioning
The partition checking code was using chainActive timestamps
to detect partitioning; with headers-first syncing, it should use
(and with this pull request, does use) pIndexBestHeader timestamps.
Fixes issue #6251
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h index abaedae207..2d39367fc6 100644 --- a/src/main.h +++ b/src/main.h @@ -186,7 +186,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); /** Try to detect Partition (network isolation) attacks against us */ -void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CChain& chain, int64_t nPowTargetSpacing); +void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CBlockIndex *const &bestHeader, int64_t nPowTargetSpacing); /** Check whether we are doing an initial block download (synchronizing from disk or network) */ bool IsInitialBlockDownload(); /** Format a string that describes several potential problems detected by the core */ |