@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -55,7 +55,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 :)
@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -81,7 +81,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 ) ;
@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -98,7 +98,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 ( ) ;
@ -118,14 +118,14 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -118,14 +118,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 ( ) ;
@ -143,7 +143,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -143,7 +143,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 ( ) ;
@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -154,7 +154,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 ( ) ;
@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -172,7 +172,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 ( ) ;
@ -186,17 +186,17 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
@@ -186,17 +186,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 ;
}