aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/checkpoints.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2014-12-06 22:46:51 +0000
committerwarptangent <warptangent@inbox.com>2015-01-04 19:39:41 -0800
commit256162fcd5cffaec5d1670e9cc32635ea540ac2d (patch)
tree7844819be9bd8dd80aeb0370b4eca1add67c7406 /src/cryptonote_core/checkpoints.cpp
parentblockchain: add consts where appropriate (diff)
downloadmonero-256162fcd5cffaec5d1670e9cc32635ea540ac2d.tar.xz
checkpoints: add consts where appropriate
Diffstat (limited to 'src/cryptonote_core/checkpoints.cpp')
-rw-r--r--src/cryptonote_core/checkpoints.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/checkpoints.cpp b/src/cryptonote_core/checkpoints.cpp
index 73668ab36..58edda7c9 100644
--- a/src/cryptonote_core/checkpoints.cpp
+++ b/src/cryptonote_core/checkpoints.cpp
@@ -99,7 +99,7 @@ namespace cryptonote
return checkpoint_height < block_height;
}
//---------------------------------------------------------------------------
- uint64_t checkpoints::get_max_height()
+ uint64_t checkpoints::get_max_height() const
{
std::map< uint64_t, crypto::hash >::const_iterator highest =
std::max_element( m_points.begin(), m_points.end(),
@@ -108,18 +108,18 @@ namespace cryptonote
return highest->first;
}
//---------------------------------------------------------------------------
- const std::map<uint64_t, crypto::hash>& checkpoints::get_points()
+ const std::map<uint64_t, crypto::hash>& checkpoints::get_points() const
{
return m_points;
}
- bool checkpoints::check_for_conflicts(checkpoints& other)
+ bool checkpoints::check_for_conflicts(const checkpoints& other) const
{
for (auto& pt : other.get_points())
{
if (m_points.count(pt.first))
{
- CHECK_AND_ASSERT_MES(pt.second == m_points[pt.first], false, "Checkpoint at given height already exists, and hash for new checkpoint was different!");
+ CHECK_AND_ASSERT_MES(pt.second == m_points.at(pt.first), false, "Checkpoint at given height already exists, and hash for new checkpoint was different!");
}
}
return true;