diff options
| author | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 15:52:05 +0530 |
|---|---|---|
| committer | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 15:52:05 +0530 |
| commit | 4f693d715c036346b642298cc94bd4d87c5f35e2 (patch) | |
| tree | c7f764d9f9d90de3947eff7910901ee3a56212b1 /src/cryptonote_core/checkpoints.cpp | |
| parent | 2b60646c9bcf8519bbe4bbc5bb433d2a0d1141a7 (diff) | |
| parent | 59a8366bb18653f14142321a9d85377ceaef8fad (diff) | |
| download | monzero-core-4f693d715c036346b642298cc94bd4d87c5f35e2.tar.gz monzero-core-4f693d715c036346b642298cc94bd4d87c5f35e2.tar.xz monzero-core-4f693d715c036346b642298cc94bd4d87c5f35e2.zip | |
Merge with origin/master
Diffstat (limited to 'src/cryptonote_core/checkpoints.cpp')
| -rw-r--r-- | src/cryptonote_core/checkpoints.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/checkpoints.cpp b/src/cryptonote_core/checkpoints.cpp index 3669a7217..c76a23841 100644 --- a/src/cryptonote_core/checkpoints.cpp +++ b/src/cryptonote_core/checkpoints.cpp @@ -93,4 +93,13 @@ namespace cryptonote uint64_t checkpoint_height = it->first; return checkpoint_height < block_height; } + uint64_t checkpoints::get_max_height() + { + std::map< uint64_t, crypto::hash >::const_iterator highest = + std::max_element( m_points.begin(), m_points.end(), + ( boost::bind(&std::map< uint64_t, crypto::hash >::value_type::first, _1) < + boost::bind(&std::map< uint64_t, crypto::hash >::value_type::first, _2 ) ) ); + return highest->first; + } + } |
