diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-11-05 12:12:50 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-11-05 12:13:04 +0100 |
| commit | 3038eb63e8a674b4818cb5d5e461f1ccf4b2932f (patch) | |
| tree | 1017d21cb0b94b3108b079a8c0611dbc7ba5851e /src/test/miner_tests.cpp | |
| parent | Merge pull request #6887 (diff) | |
| parent | Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point of... (diff) | |
| download | discoin-3038eb63e8a674b4818cb5d5e461f1ccf4b2932f.tar.xz discoin-3038eb63e8a674b4818cb5d5e461f1ccf4b2932f.zip | |
Merge pull request #6934
d1c3762 Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints"" (Gregory Maxwell)
e4e5334 Restore MedianTimePast for locktime. (Gregory Maxwell)
Diffstat (limited to 'src/test/miner_tests.cpp')
| -rw-r--r-- | src/test/miner_tests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 91a3a5738..827525783 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -4,6 +4,7 @@ #include "chainparams.h" #include "coins.h" +#include "consensus/consensus.h" #include "consensus/validation.h" #include "main.h" #include "miner.h" @@ -229,7 +230,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx.nLockTime = chainActive.Tip()->nHeight+1; hash = tx.GetHash(); mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11)); - BOOST_CHECK(!CheckFinalTx(tx)); + BOOST_CHECK(!CheckFinalTx(tx, LOCKTIME_MEDIAN_TIME_PAST)); // time locked tx2.vin.resize(1); @@ -243,7 +244,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx2.nLockTime = chainActive.Tip()->GetMedianTimePast()+1; hash = tx2.GetHash(); mempool.addUnchecked(hash, CTxMemPoolEntry(tx2, 11, GetTime(), 111.0, 11)); - BOOST_CHECK(!CheckFinalTx(tx2)); + BOOST_CHECK(!CheckFinalTx(tx2, LOCKTIME_MEDIAN_TIME_PAST)); BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey)); @@ -261,7 +262,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) //BOOST_CHECK(CheckFinalTx(tx2)); BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey)); - BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 3); + BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 2); delete pblocktemplate; chainActive.Tip()->nHeight--; |