[−][src]Module hycon_rust::consensus::difficulty_adjuster
Constants
ALPHA | Weighting Parameter used in Exponential Moving Averages for Difficulty Calculation |
MAX_DIFFICULTY | Normalistation parameter for Difficulty |
MIN_DIFFICULTY | Minimum value that can be stored in an f64 |
TARGET_TIME | Target Mean Time for Block Production |
Functions
acceptable | Compares two byte arrays to check if POW difficulty has been satisfied |
adjust_difficulty | Calculates the next target difficulty for a block |
calc_ema | Calculates a new EMA value for a given parameter |
get_target | Gets the target from an f64 difficulty as a byte array |