aboutsummaryrefslogtreecommitdiff
path: root/src/checkpoints.cpp
diff options
context:
space:
mode:
author251 <[email protected]>2019-03-23 17:41:16 +0100
committer251 <[email protected]>2019-03-23 17:43:54 +0100
commit418d3230f86f77dde6e817f502baff8a54b707fa (patch)
treea3507114d0b0a2d9184d187d6ded516791151894 /src/checkpoints.cpp
parentMerge #15642: [rpc] Remove deprecated rpc warnings (diff)
downloaddiscoin-418d3230f86f77dde6e817f502baff8a54b707fa.tar.xz
discoin-418d3230f86f77dde6e817f502baff8a54b707fa.zip
Resolve the checkpoints <-> validation CD.
This commit resolves the checkpoints -> validation -> checkpoints cirular dependency by moving `CheckPoints::GetLastCheckpoint(const CCheckpointData& data)` from `checkpoints.cpp` to `validation.cpp`.
Diffstat (limited to 'src/checkpoints.cpp')
-rw-r--r--src/checkpoints.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
deleted file mode 100644
index ad5edfeb3..000000000
--- a/src/checkpoints.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2009-2018 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include <checkpoints.h>
-
-#include <chain.h>
-#include <chainparams.h>
-#include <reverse_iterator.h>
-#include <validation.h>
-
-#include <stdint.h>
-
-
-namespace Checkpoints {
-
- CBlockIndex* GetLastCheckpoint(const CCheckpointData& data)
- {
- const MapCheckpoints& checkpoints = data.mapCheckpoints;
-
- for (const MapCheckpoints::value_type& i : reverse_iterate(checkpoints))
- {
- const uint256& hash = i.second;
- CBlockIndex* pindex = LookupBlockIndex(hash);
- if (pindex) {
- return pindex;
- }
- }
- return nullptr;
- }
-
-} // namespace Checkpoints