core: new API to disable DNS checkpoint lookups

This commit is contained in:
moneromooo-monero
2017-07-26 10:18:44 +01:00
parent c63e9633b5
commit 38756d00ff
2 changed files with 10 additions and 1 deletions
+2 -1
View File
@@ -77,6 +77,7 @@ namespace cryptonote
m_checkpoints_path(""),
m_last_dns_checkpoints_update(0),
m_last_json_checkpoints_update(0),
m_disable_dns_checkpoints(false),
m_threadpool(tools::thread_group::optimal()),
m_update_download(0)
{
@@ -108,7 +109,7 @@ namespace cryptonote
//-----------------------------------------------------------------------------------------------
bool core::update_checkpoints()
{
if (m_testnet || m_fakechain) return true;
if (m_testnet || m_fakechain || m_disable_dns_checkpoints) return true;
if (m_checkpoints_updating.test_and_set()) return true;