diff options
| author | practicalswift <[email protected]> | 2017-06-08 12:06:09 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-06-11 15:44:01 +0200 |
| commit | 67ca816849d0aa292a138e6c08edafd17ad6a948 (patch) | |
| tree | e2ca124d75428396a34ea9308e644436de912268 /src/test | |
| parent | [tests] Remove accidental trailing semicolon (diff) | |
| download | discoin-67ca816849d0aa292a138e6c08edafd17ad6a948.tar.xz discoin-67ca816849d0aa292a138e6c08edafd17ad6a948.zip | |
Simplify "bool x = y ? true : false" to "bool x = y"
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/miner_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index c95800a72..eaff2ac70 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; } |