@@ -311,18 +311,18 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
311
311
312
312
// relative time locked
313
313
tx.vin [0 ].prevout .hash = txFirst[1 ]->GetHash ();
314
- tx.vin [0 ].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | (((chainActive.Tip ()->GetMedianTimePast ()+1 -chainActive[1 ]->GetMedianTimePast ()) >> CTxIn::GetSequenceLocktimeGranularity ( fDIP0001ActiveAtTip ) ) + 1 ); // txFirst[1] is the 3rd block
314
+ tx.vin [0 ].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | (((chainActive.Tip ()->GetMedianTimePast ()+1 -chainActive[1 ]->GetMedianTimePast ()) >> CTxIn::SEQUENCE_LOCKTIME_GRANULARITY ) + 1 ); // txFirst[1] is the 3rd block
315
315
prevheights[0 ] = baseheight + 2 ;
316
316
hash = tx.GetHash ();
317
317
mempool.addUnchecked (hash, entry.Time (GetTime ()).FromTx (tx));
318
318
BOOST_CHECK (CheckFinalTx (tx, flags)); // Locktime passes
319
319
BOOST_CHECK (!TestSequenceLocks (tx, flags)); // Sequence locks fail
320
320
321
321
for (int i = 0 ; i < CBlockIndex::nMedianTimeSpan; i++)
322
- chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime += fDIP0001ActiveAtTip ? 128 : 512 ; // Trick the MedianTimePast
323
- BOOST_CHECK (SequenceLocks (tx, flags, &prevheights, CreateBlockIndex (chainActive.Tip ()->nHeight + 1 ))); // Sequence locks pass 128/ 512 seconds later
322
+ chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime += 512 ; // Trick the MedianTimePast
323
+ BOOST_CHECK (SequenceLocks (tx, flags, &prevheights, CreateBlockIndex (chainActive.Tip ()->nHeight + 1 ))); // Sequence locks pass 512 seconds later
324
324
for (int i = 0 ; i < CBlockIndex::nMedianTimeSpan; i++)
325
- chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime -= fDIP0001ActiveAtTip ? 128 : 512 ; // undo tricked MTP
325
+ chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime -= 512 ; // undo tricked MTP
326
326
327
327
// absolute height locked
328
328
tx.vin [0 ].prevout .hash = txFirst[2 ]->GetHash ();
@@ -368,9 +368,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
368
368
// For now these will still generate a valid template until BIP68 soft fork
369
369
BOOST_CHECK_EQUAL (pblocktemplate->block .vtx .size (), 3 );
370
370
delete pblocktemplate;
371
- // However if we advance height by 1 and time by 128/ 512, all of them should be mined
371
+ // However if we advance height by 1 and time by 512, all of them should be mined
372
372
for (int i = 0 ; i < CBlockIndex::nMedianTimeSpan; i++)
373
- chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime += fDIP0001ActiveAtTip ? 128 : 512 ; // Trick the MedianTimePast
373
+ chainActive.Tip ()->GetAncestor (chainActive.Tip ()->nHeight - i)->nTime += 512 ; // Trick the MedianTimePast
374
374
chainActive.Tip ()->nHeight ++;
375
375
SetMockTime (chainActive.Tip ()->GetMedianTimePast () + 1 );
376
376
0 commit comments