MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / IsFinalTx

Function IsFinalTx

src/consensus/tx_verify.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include <utilmoneystr.h>
16
17bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
18{
19 if (tx.nLockTime == 0)
20 return true;
21 if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime))
22 return true;
23 for (const auto& txin : tx.vin) {
24 if (!(txin.nSequence == CTxIn::SEQUENCE_FINAL))
25 return false;
26 }
27 return true;
28}
29
30std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block)
31{

Callers 4

CheckFinalTxFunction · 0.85
ContextualCheckBlockFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68