aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/checkpoints.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/checkpoints.cpp')
-rw-r--r--src/cryptonote_core/checkpoints.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cryptonote_core/checkpoints.cpp b/src/cryptonote_core/checkpoints.cpp
index 41b41fac5..25759792b 100644
--- a/src/cryptonote_core/checkpoints.cpp
+++ b/src/cryptonote_core/checkpoints.cpp
@@ -113,4 +113,15 @@ namespace cryptonote
return m_points;
}
+ bool checkpoints::check_for_conflicts(checkpoints& other)
+ {
+ 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!");
+ }
+ }
+ return true;
+ }
}