View in context in the libbitcoin Slack #general mirror.
class CTransaction
{
public:
...
int nLockTime;
...
bool IsFinal() const
{
if (nLockTime == 0 || nLockTime < nBestHeight)
return true;
foreach(const CTxIn& txin, vin)
if (!txin.IsFinal())
return false;
return true;
}
...
};
class CTxIn
{
public:
...
bool IsFinal() const
{
return (nSequence == UINT_MAX);
}
...
};nLockTime type to unsigned.
class CTransaction
{
public:
...
unsigned int nLockTime;
...
bool IsFinal(int64 nBlockTime=0) const
{
// Time based nLockTime implemented in 0.1.6,
// do not use time based until most 0.1.5 nodes have upgraded.
if (nBlockTime == 0)
nBlockTime = GetAdjustedTime();
if (nLockTime == 0)
return true;
if (nLockTime < (nLockTime < 500000000 ? nBestHeight : nBlockTime))
return true;
foreach(const CTxIn& txin, vin)
if (!txin.IsFinal())
return false;
return true;
}
...
};// To help v0.1.5 clients who would see it as negative number. please delete this later.
if (nLockTime > INT_MAX)
return error("AcceptTransaction() : not accepting nLockTime beyond 2038");So absolute block locktime was always active, it was forked in v0.2.0 to include time
cc0b4c3b62367a2aebe5fc1f4d0ed4b97e9c2ac9 . This change was a soft fork which activated on block 31,000. Had it been enforced by consensus before, the change to include time would have been a hard fork.b075bbf9862df41cdf5265026ba787b7d0fecb07. Technically a hard fork, but at this time all new releases were hard forks due to OP_VER anyways.and that was immediately applied to all blocks.
cb420a1dfc23d3c11c5281ed8f7ae003c2f61594 (February 2010). Before that it was only applied from block 36,001, starting with commit b075bbf9862df41cdf5265026ba787b7d0fecb07. Before that it was only applied from block 31,001.