aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2020-06-10 23:57:58 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2020-08-20 18:20:27 +0000
commit916d3596c493fec44da86aeb92b61eafeea0b596 (patch)
tree2414a90f8ae95776a4d4433428f0fe142a297e8e /src/chainparams.h
parent1bc8e8eae2dc4b47ef67afc6880ea48b8e84a086 (diff)
help: Generate checkpoint height from chainparams
Diffstat (limited to 'src/chainparams.h')
-rw-r--r--src/chainparams.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/chainparams.h b/src/chainparams.h
index 542ef329da..7aa999fb75 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -23,6 +23,11 @@ typedef std::map<int, uint256> MapCheckpoints;
struct CCheckpointData {
MapCheckpoints mapCheckpoints;
+
+ int GetHeight() const {
+ const auto& final_checkpoint = mapCheckpoints.rbegin();
+ return final_checkpoint->first /* height */;
+ }
};
/**