mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 13:05:01 -04:00
Added ability to read chechpoint hashes from json file in data folder
This commit is contained in:
parent
9956b68b18
commit
06a4578bf2
4 changed files with 65 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue