From 65b94545036ae6e38e79e9c7166a3ba1ddb83f66 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 8 Jun 2015 16:34:58 -0400 Subject: 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 --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.h') 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 */ -- cgit v1.2.3