diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-09-29 16:30:47 -0400 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2014-09-30 16:21:37 -0400 |
commit | f0b4138f1f6ecb86c971dd7edf72a92d54e22721 (patch) | |
tree | f185f6e4ddd42d55615ec3d047acce488ad8fc57 /src/cryptonote_core/checkpoints.cpp | |
parent | Fixed segfault with checkpoints loading (diff) | |
download | monero-f0b4138f1f6ecb86c971dd7edf72a92d54e22721.tar.xz |
various changes to runtime checkpoint updating
json checkpoints will be checked every 10 minutes, dns every 60.
json checkpoints always enforced, dns still with flag.
conflicting checkpoints is hard fail, but soft if dns enforce flag not
set and dns checkpoints are wonky.
Diffstat (limited to 'src/cryptonote_core/checkpoints.cpp')
-rw-r--r-- | src/cryptonote_core/checkpoints.cpp | 11 |
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; + } } |