@@ -437,7 +437,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
437
437
tx.nLockTime = 0 ;
438
438
hash = tx.GetHash ();
439
439
m_node.mempool ->addUnchecked (entry.Fee (HIGHFEE).Time (GetTime ()).SpendsCoinbase (true ).FromTx (tx));
440
- BOOST_CHECK (CheckFinalTx (CTransaction (tx), flags)); // Locktime passes
440
+ BOOST_CHECK (CheckFinalTx (:: ChainActive (). Tip (), CTransaction (tx), flags)); // Locktime passes
441
441
BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
442
442
BOOST_CHECK (SequenceLocks (CTransaction (tx), flags, prevheights, CreateBlockIndex (::ChainActive ().Tip ()->nHeight + 2 ))); // Sequence locks pass on 2nd block
443
443
@@ -447,7 +447,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
447
447
prevheights[0 ] = baseheight + 2 ;
448
448
hash = tx.GetHash ();
449
449
m_node.mempool ->addUnchecked (entry.Time (GetTime ()).FromTx (tx));
450
- BOOST_CHECK (CheckFinalTx (CTransaction (tx), flags)); // Locktime passes
450
+ BOOST_CHECK (CheckFinalTx (:: ChainActive (). Tip (), CTransaction (tx), flags)); // Locktime passes
451
451
BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
452
452
453
453
for (int i = 0 ; i < CBlockIndex::nMedianTimeSpan; i++)
@@ -463,7 +463,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
463
463
tx.nLockTime = ::ChainActive ().Tip ()->nHeight + 1 ;
464
464
hash = tx.GetHash ();
465
465
m_node.mempool ->addUnchecked (entry.Time (GetTime ()).FromTx (tx));
466
- BOOST_CHECK (!CheckFinalTx (CTransaction (tx), flags)); // Locktime fails
466
+ BOOST_CHECK (!CheckFinalTx (:: ChainActive (). Tip (), CTransaction (tx), flags)); // Locktime fails
467
467
BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
468
468
BOOST_CHECK (IsFinalTx (CTransaction (tx), ::ChainActive ().Tip ()->nHeight + 2 , ::ChainActive ().Tip ()->GetMedianTimePast ())); // Locktime passes on 2nd block
469
469
@@ -474,7 +474,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
474
474
prevheights[0 ] = baseheight + 4 ;
475
475
hash = tx.GetHash ();
476
476
m_node.mempool ->addUnchecked (entry.Time (GetTime ()).FromTx (tx));
477
- BOOST_CHECK (!CheckFinalTx (CTransaction (tx), flags)); // Locktime fails
477
+ BOOST_CHECK (!CheckFinalTx (:: ChainActive (). Tip (), CTransaction (tx), flags)); // Locktime fails
478
478
BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
479
479
BOOST_CHECK (IsFinalTx (CTransaction (tx), ::ChainActive ().Tip ()->nHeight + 2 , ::ChainActive ().Tip ()->GetMedianTimePast () + 1 )); // Locktime passes 1 second later
480
480
@@ -483,7 +483,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
483
483
prevheights[0 ] = ::ChainActive ().Tip ()->nHeight + 1 ;
484
484
tx.nLockTime = 0 ;
485
485
tx.vin [0 ].nSequence = 0 ;
486
- BOOST_CHECK (CheckFinalTx (CTransaction (tx), flags)); // Locktime passes
486
+ BOOST_CHECK (CheckFinalTx (:: ChainActive (). Tip (), CTransaction (tx), flags)); // Locktime passes
487
487
BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
488
488
tx.vin [0 ].nSequence = 1 ;
489
489
BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
0 commit comments