diff options
author | Tomer Konforty <tomerk@kon40.com> | 2014-09-24 17:36:04 +0300 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-25 00:00:44 +0200 |
commit | 06a4578bf253cfde6f0ab352994b3aadf61ec372 (patch) | |
tree | c96190c1c5b4b112f7086a9071ac4d7f2eeb6b30 /src/cryptonote_core/checkpoints.cpp | |
parent | checkpoint (diff) | |
download | monero-06a4578bf253cfde6f0ab352994b3aadf61ec372.tar.xz |
Added ability to read chechpoint hashes from json file in data folder
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; + } + } |