Skip to content

Commit f4a6180

Browse files
committed
Merge #10175: Remove excess logic.
9a763d4 Remove excess logic. (practicalswift) Tree-SHA512: cfef280cc9cccf5042c9c49a8cd6fb6700764671cdd0d988149121f56c2d43a9ac38c5fc99c92385a9619d2d846480e02a9d655fa2586b1c284961b4634c229b
2 parents e7b90f7 + 9a763d4 commit f4a6180

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/miner.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ int BlockAssembler::UpdatePackagesForAdded(const CTxMemPool::setEntries& already
317317
bool BlockAssembler::SkipMapTxEntry(CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx)
318318
{
319319
assert (it != mempool.mapTx.end());
320-
if (mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it))
321-
return true;
322-
return false;
320+
return mapModifiedTx.count(it) || inBlock.count(it) || failedTx.count(it);
323321
}
324322

325323
void BlockAssembler::SortForBlock(const CTxMemPool::setEntries& package, CTxMemPool::txiter entry, std::vector<CTxMemPool::txiter>& sortedEntries)

src/qt/bantablemodel.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,5 @@ void BanTableModel::sort(int column, Qt::SortOrder order)
181181

182182
bool BanTableModel::shouldShow()
183183
{
184-
if (priv->size() > 0)
185-
return true;
186-
return false;
184+
return priv->size() > 0;
187185
}

src/validation.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,10 +1299,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
12991299
bool CScriptCheck::operator()() {
13001300
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
13011301
const CScriptWitness *witness = &ptxTo->vin[nIn].scriptWitness;
1302-
if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error)) {
1303-
return false;
1304-
}
1305-
return true;
1302+
return VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error);
13061303
}
13071304

13081305
int GetSpendHeight(const CCoinsViewCache& inputs)

0 commit comments

Comments
 (0)