Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68. For each input that is not sequence locked, the corresponding entries in prevHeights are set to 0 as they do not affect the calculation.

Synopsis

Declared in <consensus/tx_verify.h>

std::pair<int, int64_t>
CalculateSequenceLocks(
    CTransaction const& tx,
    int flags,
    std::vector<int>& prevHeights,
    CBlockIndex const& block);

Return Value

The minimum height and median time past at which tx becomes final.

Parameters

Name

Description

tx

The transaction whose sequence locks are computed.

flags

Lock‐time verification flags controlling BIP 68 enforcement.

prevHeights

Confirmation height of each input, modified in place for non‐locked inputs.

block

Block relative to which the locks are evaluated.

Created with MrDocs