38#define ADD_CHECKPOINT(h, hash) CHECK_AND_ASSERT(add_checkpoint(h, hash), false);
39#define ADD_CHECKPOINT2(h, hash, difficulty) CHECK_AND_ASSERT(add_checkpoint(h, hash, difficulty), false);
40#define JSON_HASH_FILE_NAME "checkpoints.json"
137 const std::map<uint64_t, crypto::hash>&
get_points()
const;
static uint64_t h
Definition blockchain_stats.cpp:55
bool check_block(uint64_t height, const crypto::hash &h, bool &is_a_checkpoint) const
checks if the given height and hash agree with the checkpoints
Definition checkpoints.cpp:114
checkpoints()
default constructor
Definition checkpoints.cpp:73
bool load_checkpoints_from_dns(network_type nettype=MAINNET)
load new checkpoints from DNS
Definition checkpoints.cpp:300
bool init_default_checkpoints(network_type nettype)
loads the default main chain checkpoints
Definition checkpoints.cpp:183
std::map< uint64_t, difficulty_type > m_difficulty_points
the difficulty checkpoints container
Definition checkpoints.h:200
bool load_new_checkpoints(const std::string &json_hashfile_fullpath, network_type nettype=MAINNET, bool dns=true)
load new checkpoints
Definition checkpoints.cpp:356
bool is_in_checkpoint_zone(uint64_t height) const
checks if there is a checkpoint in the future
Definition checkpoints.cpp:109
bool check_for_conflicts(const checkpoints &other) const
checks if our checkpoints container conflicts with another
Definition checkpoints.cpp:171
bool is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height) const
checks if alternate chain blocks should be kept for a given height
Definition checkpoints.cpp:139
bool load_checkpoints_from_json(const std::string &json_hashfile_fullpath)
load new checkpoints from json
Definition checkpoints.cpp:264
const std::map< uint64_t, crypto::hash > & get_points() const
gets the checkpoints container
Definition checkpoints.cpp:161
bool add_checkpoint(uint64_t height, const std::string &hash_str, const std::string &difficulty_str="")
adds a checkpoint to the container
Definition checkpoints.cpp:77
std::map< uint64_t, crypto::hash > m_points
the checkpoints container
Definition checkpoints.h:199
const std::map< uint64_t, difficulty_type > & get_difficulty_points() const
gets the difficulty checkpoints container
Definition checkpoints.cpp:166
uint64_t get_max_height() const
gets the highest checkpoint height
Definition checkpoints.cpp:154
POD_CLASS hash
Definition hash.h:49
Holds cryptonote related classes and helpers.
Definition blockchain_db.cpp:45
network_type
Definition cryptonote_config.h:302
@ MAINNET
Definition cryptonote_config.h:303
unsigned __int64 uint64_t
Definition stdint.h:136