bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const
{
// Time based nLockTime implemented in 0.1.6
if (nLockTime == 0)
return true;
if (nBlockHeight == 0)
nBlockHeight = nBestHeight;
if (nBlockTime == 0)
nBlockTime = GetAdjustedTime();
if ((int64)nLockTime < ((int64)nLockTime < LOCKTIME_THRESHOLD ? (int64)nBlockHeight : nBlockTime))
return true;
BOOST_FOREACH(const CTxIn& txin, vin)
if (!txin.IsFinal())
return false;
return true;
}
IsFinal() can never return false. The final return true should be return false and the input check should come before the time check (or left where it is and had its sense reversed). Would be a trivial fix except its a soft-forking change. ... and will probably require bumping the transaction version number as well as updating the block enforcing rules.
It's well known that replacement didn't work, but nLockTime not being enforced in the chain was a surprise to me