diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-04-10 10:24:49 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-04-10 10:24:49 +0200 |
commit | 9a763d4f86fb2428bfcae6cad5326600ada10c11 (patch) | |
tree | 216bc64aac841ad0a34ca5f993bac2434104ef1b /src | |
parent | 813eacf81b7359906bbcf3d926b411415200362c (diff) |
Remove excess logic.
Diffstat (limited to 'src')
-rw-r--r-- | src/miner.cpp | 4 | ||||
-rw-r--r-- | src/qt/bantablemodel.cpp | 4 | ||||
-rw-r--r-- | src/validation.cpp | 5 |
3 files changed, 3 insertions, 10 deletions
diff --git a/src/miner.cpp b/src/miner.cpp index 386d75c4be..69a89bd617 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -317,9 +317,7 @@ int BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& already bool BlockAssembler::SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx) { assert (it != mempool.mapTx.end()); - if (mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it)) - return true; - return false; + return mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it); } void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries) diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index 4b34e73eb7..f8a99506c1 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -181,7 +181,5 @@ void BanTableModel::sort(int column, Qt::SortOrder order) bool BanTableModel::shouldShow() { - if (priv->size() > 0) - return true; - return false; + return priv->size() > 0; } diff --git a/src/validation.cpp b/src/validation.cpp index 239893dc0b..41b085ffa7 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1330,10 +1330,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight) bool CScriptCheck::operator()() { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; const CScriptWitness *witness = &ptxTo->vin[nIn].scriptWitness; - if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error)) { - return false; - } - return true; + return VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error); } int GetSpendHeight(const CCoinsViewCache& inputs) |