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.
This commit is contained in:
Thomas Winget 2014-09-29 16:30:47 -04:00
parent 7568f89c55
commit f0b4138f1f
7 changed files with 113 additions and 23 deletions

View file

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