aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-08-25 18:49:25 -0700
committerJeff Garzik <jgarzik@bitpay.com>2013-08-25 18:49:25 -0700
commitbb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0 (patch)
tree78ce02c824847489b87d7a76261f0b187c3f620e /src/test
parentb62dc051aa44ee73e24b49dd9337de2434b89710 (diff)
parentf1dbed9233fb138026c646db0ac34e83ae2114f1 (diff)
downloadbitcoin-bb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0.tar.xz
Merge pull request #2928 from jgarzik/cnb-txout
CreateNewBlock / getblocktemplate cleaning
Diffstat (limited to 'src/test')
-rw-r--r--src/test/miner_tests.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index bd1d998c4f..8183504147 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
uint256 hash;
// Simple block creation, nothing special yet:
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
// We can't make transactions until we have inputs
// Therefore, load 100 blocks :)
@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
delete pblocktemplate;
// Just to make sure we can still make simple blocks
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
// block sigops > limit: 1000 CHECKMULTISIG + 1
tx.vin.resize(1);
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
mempool.addUnchecked(hash, tx);
tx.vin[0].prevout.hash = hash;
}
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
@@ -119,14 +119,14 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
mempool.addUnchecked(hash, tx);
tx.vin[0].prevout.hash = hash;
}
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
// orphan in mempool
hash = tx.GetHash();
mempool.addUnchecked(hash, tx);
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].nValue = 5900000000LL;
hash = tx.GetHash();
mempool.addUnchecked(hash, tx);
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].nValue = 0;
hash = tx.GetHash();
mempool.addUnchecked(hash, tx);
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].nValue -= 1000000;
hash = tx.GetHash();
mempool.addUnchecked(hash,tx);
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
@@ -187,17 +187,17 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].scriptPubKey = CScript() << OP_2;
hash = tx.GetHash();
mempool.addUnchecked(hash, tx);
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
mempool.clear();
// subsidy changing
int nHeight = pindexBest->nHeight;
pindexBest->nHeight = 209999;
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
pindexBest->nHeight = 210000;
- BOOST_CHECK(pblocktemplate = CreateNewBlock(reservekey));
+ BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
pindexBest->nHeight = nHeight;
}