diff options
author | Gregory Maxwell <greg@xiph.org> | 2016-10-22 05:33:25 +0000 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2016-11-02 01:47:02 +0000 |
commit | fd46136dfaf68a7046cf7b8693824d73ac6b1caf (patch) | |
tree | 033a84a28fd516325144cb0cd9b31545f81fddf8 /src/consensus/params.h | |
parent | 3d69ecb4edeb80003a1a41442e320898a30dbd9c (diff) |
IBD check uses minimumchain work instead of checkpoints.
This introduces a 'minimum chain work' chainparam which is intended
to be the known amount of work in the chain for the network at the
time of software release. If you don't have this much work, you're
not yet caught up.
This is used instead of the count of blocks test from checkpoints.
This criteria is trivial to keep updated as there is no element of
subjectivity, trust, or position dependence to it. It is also a more
reliable metric of sync status than a block count.
Diffstat (limited to 'src/consensus/params.h')
-rw-r--r-- | src/consensus/params.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h index 0e73cace83..20efc68ade 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -61,6 +61,7 @@ struct Params { int64_t nPowTargetSpacing; int64_t nPowTargetTimespan; int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; } + uint256 nMinimumChainWork; }; } // namespace Consensus |