aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-09-26 15:00:59 -0500
committerluigi1111 <luigi1111w@gmail.com>2022-09-26 15:00:59 -0500
commit1f27fdf6a5b5eeee76049fc3974ff096b8919717 (patch)
tree9c1d29f39c59149775d8e116064632420bc9351a /src/cryptonote_protocol
parent0bef4265ac0d2decd679367f767fa885c9f9625e (diff)
parent802c4bb0e4e7a94c07e5c06a3e993e104b529e52 (diff)
downloadmonzero-core-1f27fdf6a5b5eeee76049fc3974ff096b8919717.tar.gz
monzero-core-1f27fdf6a5b5eeee76049fc3974ff096b8919717.tar.xz
monzero-core-1f27fdf6a5b5eeee76049fc3974ff096b8919717.zip
Merge pull request #8588
802c4bb Move update_checkpoints() to a later stage (SChernykh)
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index af3031263..bd2f8ce85 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -537,6 +537,10 @@ namespace cryptonote
MLOG_PEER_STATE("requesting chain");
}
+ // load json & DNS checkpoints every 10min/hour respectively,
+ // and verify them with respect to what blocks we already have
+ CHECK_AND_ASSERT_MES(m_core.update_checkpoints(), 1, "One or more checkpoints loaded from json or dns conflicted with existing checkpoints.");
+
return 1;
}
//------------------------------------------------------------------------------------------------------------------------
@@ -819,6 +823,10 @@ namespace cryptonote
post_notify<NOTIFY_REQUEST_CHAIN>(r, context);
MLOG_PEER_STATE("requesting chain");
}
+
+ // load json & DNS checkpoints every 10min/hour respectively,
+ // and verify them with respect to what blocks we already have
+ CHECK_AND_ASSERT_MES(m_core.update_checkpoints(), 1, "One or more checkpoints loaded from json or dns conflicted with existing checkpoints.");
}
}
else