diff options
| author | Thomas Winget <tewinget@gmail.com> | 2015-10-07 22:28:37 -0400 |
|---|---|---|
| committer | Thomas Winget <tewinget@gmail.com> | 2016-03-24 03:39:41 -0400 |
| commit | 540a76c5c29aa0742c00af4391ce718e7ec69c97 (patch) | |
| tree | 56948f3dd3e0524eb787a1ded24c623195d3b896 /src/cryptonote_core/blockchain_storage.cpp | |
| parent | 1b0c98e7e9951fbeff8b713dd80b040e628059ff (diff) | |
| download | monzero-core-540a76c5c29aa0742c00af4391ce718e7ec69c97.tar.gz monzero-core-540a76c5c29aa0742c00af4391ce718e7ec69c97.tar.xz monzero-core-540a76c5c29aa0742c00af4391ce718e7ec69c97.zip | |
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_storage.cpp')
| -rw-r--r-- | src/cryptonote_core/blockchain_storage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptonote_core/blockchain_storage.cpp b/src/cryptonote_core/blockchain_storage.cpp index e1b89f887..a829b7cbe 100644 --- a/src/cryptonote_core/blockchain_storage.cpp +++ b/src/cryptonote_core/blockchain_storage.cpp @@ -48,7 +48,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 "serialization/json_archive.h" #include "../../contrib/otshell_utils/utils.hpp" #include "../../src/p2p/data_logger.hpp" @@ -1854,7 +1854,7 @@ void blockchain_storage::check_against_checkpoints(const checkpoints& points, bo // with an existing checkpoint. bool blockchain_storage::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; } @@ -1863,7 +1863,7 @@ bool blockchain_storage::update_checkpoints(const std::string& file_path, bool c // 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; } @@ -1871,7 +1871,7 @@ bool blockchain_storage::update_checkpoints(const std::string& file_path, bool c else if (check_dns) { checkpoints dns_points; - cryptonote::load_checkpoints_from_dns(dns_points, m_testnet); + dns_points.load_checkpoints_from_dns(m_testnet); if (m_checkpoints.check_for_conflicts(dns_points)) { check_against_checkpoints(dns_points, false); |
