mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 13:14:58 -04:00
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:
parent
7568f89c55
commit
f0b4138f1f
7 changed files with 113 additions and 23 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue