Electroneum
difficulty.cpp File Reference
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <vector>
#include "int-util.h"
#include "crypto/hash.h"
#include "cryptonote_config.h"
#include "difficulty.h"
Include dependency graph for difficulty.cpp:

Go to the source code of this file.

Namespaces

 cryptonote
 Holds cryptonote related classes and helpers.
 

Macros

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "difficulty"
 
#define FORCE_FULL_128_BITS
 

Functions

bool cryptonote::check_hash_64 (const crypto::hash &hash, uint64_t difficulty)
 checks if a hash fits the given difficulty More...
 
uint64_t cryptonote::next_difficulty_64 (std::vector< std::uint64_t > timestamps, std::vector< uint64_t > cumulative_difficulties, size_t target_seconds, uint8_t version)
 
const difficulty_type cryptonote::max64bit (std::numeric_limits< std::uint64_t >::max())
 
const boost::multiprecision::uint256_t cryptonote::max128bit (std::numeric_limits< boost::multiprecision::uint128_t >::max())
 
const boost::multiprecision::uint512_t cryptonote::max256bit (std::numeric_limits< boost::multiprecision::uint256_t >::max())
 
bool cryptonote::check_hash_128 (const crypto::hash &hash, difficulty_type difficulty)
 
bool cryptonote::check_hash (const crypto::hash &hash, difficulty_type difficulty)
 
difficulty_type cryptonote::next_difficulty (std::vector< uint64_t > timestamps, std::vector< difficulty_type > cumulative_difficulties, size_t target_seconds, uint8_t version)
 
std::string cryptonote::hex (difficulty_type v)
 

Macro Definition Documentation

◆ ELECTRONEUM_DEFAULT_LOG_CATEGORY

#define ELECTRONEUM_DEFAULT_LOG_CATEGORY   "difficulty"

Definition at line 44 of file difficulty.cpp.

◆ FORCE_FULL_128_BITS

#define FORCE_FULL_128_BITS

Definition at line 182 of file difficulty.cpp.