ordspv
    Preparing search index...

    Function calcNextBits

    • Difficulty retarget: exact port of pow.cpp CalculateNextWorkRequired. firstTime is the timestamp of the FIRST block of the closing period (height H-interval for a boundary at H), lastTime of its LAST block (height H-1). Bitcoin's off-by-one 2015-block window, faithfully kept. Multiplication precedes division (consensus truncation order).

      Parameters

      • prevBits: number
      • firstTime: number
      • lastTime: number
      • params: ChainParams = MAINNET_CHAIN_PARAMS

      Returns number