aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2015-10-07 22:28:37 -0400
committerThomas Winget <tewinget@gmail.com>2016-03-24 03:39:41 -0400
commit540a76c5c29aa0742c00af4391ce718e7ec69c97 (patch)
tree56948f3dd3e0524eb787a1ded24c623195d3b896 /src/cryptonote_core/blockchain.cpp
parentdoxygen documentation for checkpoints.{h,cpp} (diff)
downloadmonero-540a76c5c29aa0742c00af4391ce718e7ec69c97.tar.xz
Move checkpoint functions into checkpoints class
The functions in src/cryptonote_core/checkpoints_create.{h,cpp} should be member functions of the checkpoints class, if nothing else for the sake of keeping their documentation together. This commit covers moving those functions to be member functions of the checkpoints class as well as documenting those functions.
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 2be4f6aee..dec7b8e29 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -49,7 +49,7 @@
#include "common/boost_serialization_helper.h"
#include "warnings.h"
#include "crypto/hash.h"
-#include "cryptonote_core/checkpoints_create.h"
+#include "cryptonote_core/checkpoints.h"
#include "cryptonote_core/cryptonote_core.h"
#if defined(PER_BLOCK_CHECKPOINT)
#include "blocks/blocks.h"
@@ -2860,16 +2860,16 @@ void Blockchain::check_against_checkpoints(const checkpoints& points, bool enfor
// with an existing checkpoint.
bool Blockchain::update_checkpoints(const std::string& file_path, bool check_dns)
{
- if (!cryptonote::load_checkpoints_from_json(m_checkpoints, file_path))
+ if (!m_checkpoints.load_checkpoints_from_json(file_path))
{
- return false;
+ return false;
}
// if we're checking both dns and json, load checkpoints from dns.
// if we're not hard-enforcing dns checkpoints, handle accordingly
if (m_enforce_dns_checkpoints && check_dns)
{
- if (!cryptonote::load_checkpoints_from_dns(m_checkpoints))
+ if (!m_checkpoints.load_checkpoints_from_dns())
{
return false;
}
@@ -2877,7 +2877,7 @@ bool Blockchain::update_checkpoints(const std::string& file_path, bool check_dns
else if (check_dns)
{
checkpoints dns_points;
- cryptonote::load_checkpoints_from_dns(dns_points);
+ dns_points.load_checkpoints_from_dns();
if (m_checkpoints.check_for_conflicts(dns_points))
{
check_against_checkpoints(dns_points, false);