From 310ff00e6516562eea50581c36fdda35184bd690 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 2 May 2017 14:50:25 +0200 Subject: [PATCH] Merge #10175: Remove excess logic. 9a763d4 Remove excess logic. (practicalswift) Tree-SHA512: cfef280cc9cccf5042c9c49a8cd6fb6700764671cdd0d988149121f56c2d43a9ac38c5fc99c92385a9619d2d846480e02a9d655fa2586b1c284961b4634c229b fix 10175 Signed-off-by: Pasta fix 10175 Signed-off-by: Pasta fix 10175 Signed-off-by: Pasta --- src/miner.cpp | 4 +--- src/qt/bantablemodel.cpp | 4 +--- src/validation.cpp | 5 +---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 676ed7c8fd..b0e2f0da3c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -342,9 +342,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& sortedEntries) diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index ee46feed31..391d509b26 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 3574569395..e49206cf31 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1337,10 +1337,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight) bool CScriptCheck::operator()() { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; PrecomputedTransactionData txdata(*ptxTo); - if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, txdata, cacheStore), &error)) { - return false; - } - return true; + return VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, txdata, cacheStore), &error); } int GetSpendHeight(const CCoinsViewCache& inputs)