Monero
Loading...
Searching...
No Matches
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:

Classes

class  cryptonote::vector

Namespaces

namespace  cryptonote
 Holds cryptonote related classes and helpers.

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "difficulty"
#define FORCE_FULL_128_BITS

Functions

static void cryptonote::mul (uint64_t a, uint64_t b, uint64_t &low, uint64_t &high)
static bool cryptonote::cadd (uint64_t a, uint64_t b)
static bool cryptonote::cadc (uint64_t a, uint64_t b, bool c)
bool cryptonote::check_hash_64 (const crypto::hash &hash, uint64_t difficulty)
 checks if a hash fits the given difficulty
uint64_t cryptonote::next_difficulty_64 (std::vector< std::uint64_t > timestamps, std::vector< uint64_t > cumulative_difficulties, size_t target_seconds)
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)
std::string cryptonote::hex (difficulty_type v)

Macro Definition Documentation

◆ FORCE_FULL_128_BITS

#define FORCE_FULL_128_BITS

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "difficulty"