Crate cfxcore_pow

Source

Structs§

CacheBuilder
PowComputer
ProofOfWorkConfig
ProofOfWorkProblem
ProofOfWorkSolution
TargetDifficultyManager
This is a data structure to cache the computed target difficulty of a adjustment period. Each element is indexed by the hash of the upper boundary block of the period.

Enums§

MiningType

Constants§

POW_STAGE_LENGTH

Traits§

ConsensusProvider

Functions§

boundary_to_difficulty
Convert boundary to its original difficulty. Basically just f(x) = 2^256 / x.
compute_inv_x_times_2_pow_256_floor
Compute [2^256 / x], where x >= 2 and x < 2^256.
difficulty_to_boundary
Convert difficulty to the target boundary. Basically just f(x) = 2^256 / x.
nonce_to_lower_bound
pow_hash_to_quality
pow_quality_to_hash
This should only be used in tests.