Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints

Transactions are not allowed in the memory pool or selected for inclusion in a block until their lock times exceed chainActive.Tip()->GetMedianTimePast(). However blocks including transactions which are only mature under the old rules are still accepted; this is *not* the soft-fork required to actually rely on the new constraint in production.
This commit is contained in:
Mark Friedenbach 2015-06-03 15:01:47 -07:00 committed by Matt Corallo
parent 8bdb2d4d1d
commit bbdccaa987
3 changed files with 15 additions and 14 deletions

View file

@ -160,7 +160,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
// Enforce sequnce numbers as relative lock-time
// only for tx.nVersion >= 2.
int nLockTimeFlags = 0;
int nLockTimeFlags = LOCKTIME_MEDIAN_TIME_PAST;
if (tx.nVersion >= 2)
nLockTimeFlags |= LOCKTIME_VERIFY_SEQUENCE;