@@ -28,7 +28,7 @@ struct MinerTestingSetup : public TestingSetup {
2828 void TestPackageSelection (const CChainParams& chainparams, const CScript& scriptPubKey, const std::vector<CTransactionRef>& txFirst) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, m_node.mempool->cs);
2929 bool TestSequenceLocks (const CTransaction& tx, int flags) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, m_node.mempool->cs)
3030 {
31- return CheckSequenceLocks (*m_node.mempool , tx, flags);
31+ return CheckSequenceLocks (:: ChainstateActive (), *m_node.mempool , tx, flags);
3232 }
3333 BlockAssembler AssemblerForTest (const CChainParams& params);
3434};
@@ -437,7 +437,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
437437 tx.nLockTime = 0 ;
438438 hash = tx.GetHash ();
439439 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
441441 BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
442442 BOOST_CHECK (SequenceLocks (CTransaction (tx), flags, prevheights, CreateBlockIndex (::ChainActive ().Tip ()->nHeight + 2 ))); // Sequence locks pass on 2nd block
443443
@@ -447,7 +447,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
447447 prevheights[0 ] = baseheight + 2 ;
448448 hash = tx.GetHash ();
449449 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
451451 BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
452452
453453 for (int i = 0 ; i < CBlockIndex::nMedianTimeSpan; i++)
@@ -463,7 +463,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
463463 tx.nLockTime = ::ChainActive ().Tip ()->nHeight + 1 ;
464464 hash = tx.GetHash ();
465465 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
467467 BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
468468 BOOST_CHECK (IsFinalTx (CTransaction (tx), ::ChainActive ().Tip ()->nHeight + 2 , ::ChainActive ().Tip ()->GetMedianTimePast ())); // Locktime passes on 2nd block
469469
@@ -474,7 +474,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
474474 prevheights[0 ] = baseheight + 4 ;
475475 hash = tx.GetHash ();
476476 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
478478 BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
479479 BOOST_CHECK (IsFinalTx (CTransaction (tx), ::ChainActive ().Tip ()->nHeight + 2 , ::ChainActive ().Tip ()->GetMedianTimePast () + 1 )); // Locktime passes 1 second later
480480
@@ -483,7 +483,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
483483 prevheights[0 ] = ::ChainActive ().Tip ()->nHeight + 1 ;
484484 tx.nLockTime = 0 ;
485485 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
487487 BOOST_CHECK (TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks pass
488488 tx.vin [0 ].nSequence = 1 ;
489489 BOOST_CHECK (!TestSequenceLocks (CTransaction (tx), flags)); // Sequence locks fail
0 commit comments