Added ability to read chechpoint hashes from json file in data folder

This commit is contained in:
Tomer Konforty 2014-09-24 17:36:04 +03:00 committed by Riccardo Spagni
parent 9956b68b18
commit 06a4578bf2
4 changed files with 65 additions and 0 deletions

View file

@ -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;
}
}