38 #define ADD_CHECKPOINT(h, hash) CHECK_AND_ASSERT(add_checkpoint(h, hash), false); 39 #define JSON_HASH_FILE_NAME "checkpoints.json" 135 const std::map<uint64_t, crypto::hash>&
get_points()
const;
190 std::map<uint64_t, crypto::hash> m_points;
bool add_checkpoint(uint64_t height, const std::string &hash_str)
adds a checkpoint to the container
uint64_t get_max_height() const
gets the highest checkpoint height
bool init_default_checkpoints(network_type nettype)
loads the default main chain checkpoints
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
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
Holds cryptonote related classes and helpers.
unsigned __int64 uint64_t
bool load_checkpoints_from_json(const std::string &json_hashfile_fullpath)
load new checkpoints from json
bool load_new_checkpoints(const std::string &json_hashfile_fullpath, network_type nettype=MAINNET, bool dns=true)
load new checkpoints
bool load_checkpoints_from_dns(network_type nettype=MAINNET)
load new checkpoints from DNS
A container for blockchain checkpoints.
const std::map< uint64_t, crypto::hash > & get_points() const
gets the checkpoints container
checkpoints()
default constructor
bool check_for_conflicts(const checkpoints &other) const
checks if our checkpoints container conflicts with another
bool is_in_checkpoint_zone(uint64_t height) const
checks if there is a checkpoint in the future