GetBlockProofEquivalentTime

Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds.

Synopsis

Declared in <chain.h>

int64_t
GetBlockProofEquivalentTime(
    CBlockIndex const& to,
    CBlockIndex const& from,
    CBlockIndex const& tip,
    Consensus::Params const& params);

Return Value

The equivalent time in seconds.

Parameters

NameDescription
toThe block index entry to measure work up to.
fromThe block index entry to measure work from.
tipThe block index entry whose difficulty sets the assumed hashrate.
paramsThe consensus parameters.