This commit is contained in:
stoffu 2018-02-16 20:04:04 +09:00
parent cc9a0bee04
commit af773211cb
No known key found for this signature in database
GPG key ID: 41DAB8343A9EC012
58 changed files with 566 additions and 357 deletions

View file

@ -33,6 +33,7 @@
#include <vector>
#include "misc_log_ex.h"
#include "crypto/hash.h"
#include "cryptonote_config.h"
#define ADD_CHECKPOINT(h, hash) CHECK_AND_ASSERT(add_checkpoint(h, hash), false);
#define JSON_HASH_FILE_NAME "checkpoints.json"
@ -147,11 +148,11 @@ namespace cryptonote
/**
* @brief loads the default main chain checkpoints
* @param testnet whether to load testnet checkpoints or mainnet
* @param nettype network type
*
* @return true unless adding a checkpoint fails
*/
bool init_default_checkpoints(bool testnet);
bool init_default_checkpoints(network_type nettype);
/**
* @brief load new checkpoints
@ -160,12 +161,12 @@ namespace cryptonote
* (optionally) from DNS.
*
* @param json_hashfile_fullpath path to the json checkpoints file
* @param testnet whether to load testnet checkpoints or mainnet
* @param nettype network type
* @param dns whether or not to load DNS checkpoints
*
* @return true if loading successful and no conflicts
*/
bool load_new_checkpoints(const std::string &json_hashfile_fullpath, bool testnet=false, bool dns=true);
bool load_new_checkpoints(const std::string &json_hashfile_fullpath, network_type nettype=MAINNET, bool dns=true);
/**
* @brief load new checkpoints from json
@ -179,11 +180,11 @@ namespace cryptonote
/**
* @brief load new checkpoints from DNS
*
* @param testnet whether to load testnet checkpoints or mainnet
* @param nettype network type
*
* @return true if loading successful and no conflicts
*/
bool load_checkpoints_from_dns(bool testnet = false);
bool load_checkpoints_from_dns(network_type nettype = MAINNET);
private:
std::map<uint64_t, crypto::hash> m_points; //!< the checkpoints container