From 30c2d9db48ab552a3deef2df504fd973200756da Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 8 Jun 2017 09:43:54 +0200 Subject: [tests] Remove unused function InsecureRandBytes(size_t len) --- src/test/test_bitcoin.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/test') diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index 0087eeb2d7..c9e4a3427f 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -33,7 +33,6 @@ static inline uint256 InsecureRand256() { return insecure_rand_ctx.rand256(); } static inline uint64_t InsecureRandBits(int bits) { return insecure_rand_ctx.randbits(bits); } static inline uint64_t InsecureRandRange(uint64_t range) { return insecure_rand_ctx.randrange(range); } static inline bool InsecureRandBool() { return insecure_rand_ctx.randbool(); } -static inline std::vector InsecureRandBytes(size_t len) { return insecure_rand_ctx.randbytes(len); } /** Basic testing setup. * This just configures logging and chain parameters. -- cgit v1.2.3 From 67ca816849d0aa292a138e6c08edafd17ad6a948 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 8 Jun 2017 12:06:09 +0200 Subject: Simplify "bool x = y ? true : false" to "bool x = y" --- src/test/miner_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index c95800a728..eaff2ac70d 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { tx.vout[0].nValue -= LOWFEE; hash = tx.GetHash(); - bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase + bool spendsCoinbase = i == 0; // only first tx spends coinbase // If we don't set the # of sig ops in the CTxMemPoolEntry, template creation fails mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx)); tx.vin[0].prevout.hash = hash; @@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { tx.vout[0].nValue -= LOWFEE; hash = tx.GetHash(); - bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase + bool spendsCoinbase = i == 0; // only first tx spends coinbase // If we do set the # of sig ops in the CTxMemPoolEntry, template creation passes mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).SigOpsCost(80).FromTx(tx)); tx.vin[0].prevout.hash = hash; @@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { tx.vout[0].nValue -= LOWFEE; hash = tx.GetHash(); - bool spendsCoinbase = (i == 0) ? true : false; // only first tx spends coinbase + bool spendsCoinbase = i == 0; // only first tx spends coinbase mempool.addUnchecked(hash, entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(spendsCoinbase).FromTx(tx)); tx.vin[0].prevout.hash = hash; } -- cgit v1.2.3