Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/tx_verify.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Calculates the block height and previous block's median time past at which | * 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. | * the transaction will be considered final in the context of BIP 68. | ||||
* Also removes from the vector of input heights any entries which did not | * Also removes from the vector of input heights any entries which did not | ||||
* correspond to sequence locked inputs as they do not affect the calculation. | * correspond to sequence locked inputs as they do not affect the calculation. | ||||
*/ | */ | ||||
std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, | std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, | ||||
int flags, | int flags, | ||||
std::vector<int> *prevHeights, | std::vector<int> &prevHeights, | ||||
const CBlockIndex &block); | const CBlockIndex &block); | ||||
bool EvaluateSequenceLocks(const CBlockIndex &block, | bool EvaluateSequenceLocks(const CBlockIndex &block, | ||||
std::pair<int, int64_t> lockPair); | std::pair<int, int64_t> lockPair); | ||||
/** | /** | ||||
* Check if transaction is final per BIP 68 sequence numbers and can be included | * Check if transaction is final per BIP 68 sequence numbers and can be included | ||||
* in a block. Consensus critical. Takes as input a list of heights at which | * in a block. Consensus critical. Takes as input a list of heights at which | ||||
* tx's inputs (in order) confirmed. | * tx's inputs (in order) confirmed. | ||||
*/ | */ | ||||
bool SequenceLocks(const CTransaction &tx, int flags, | bool SequenceLocks(const CTransaction &tx, int flags, | ||||
std::vector<int> *prevHeights, const CBlockIndex &block); | std::vector<int> &prevHeights, const CBlockIndex &block); | ||||
#endif // BITCOIN_CONSENSUS_TX_VERIFY_H | #endif // BITCOIN_CONSENSUS_TX_VERIFY_H |