mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Merge #13767: Remove redundant assignments (dead stores)
dd777f3e12 Remove unused variable (practicalswift) cdf4089457 Remove redundant assignments (dead stores) (practicalswift) Pull request description: Remove redundant assignments (dead stores). Tree-SHA512: e852059b22a161c34a0f18a6a6ed798e2b35e6d2b9f23c526af0ec33e01f6a5bb1fa5ada6671ba183d7b02393ff0d397be5aa4b4e2edbd5e604c9a76ac48d249
This commit is contained in:
parent
d68094b3b7
commit
f3dbd9e16e
@ -64,7 +64,7 @@ void Check(const std::string& prv, const std::string& pub, int flags, const std:
|
||||
BOOST_CHECK_EQUAL(pub, pub2);
|
||||
|
||||
// Check that both can be serialized with private key back to the private version, but not without private key.
|
||||
std::string prv1, prv2;
|
||||
std::string prv1;
|
||||
BOOST_CHECK(parse_priv->ToPrivateString(keys_priv, prv1));
|
||||
BOOST_CHECK_EQUAL(prv, prv1);
|
||||
BOOST_CHECK(!parse_priv->ToPrivateString(keys_pub, prv1));
|
||||
|
@ -895,17 +895,19 @@ BOOST_AUTO_TEST_CASE(script_build)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UPDATE_JSON_TESTS
|
||||
std::string strGen;
|
||||
|
||||
#endif
|
||||
for (TestBuilder& test : tests) {
|
||||
test.Test();
|
||||
std::string str = JSONPrettyPrint(test.GetJSON());
|
||||
#ifndef UPDATE_JSON_TESTS
|
||||
#ifdef UPDATE_JSON_TESTS
|
||||
strGen += str + ",\n";
|
||||
#else
|
||||
if (tests_set.count(str) == 0) {
|
||||
BOOST_CHECK_MESSAGE(false, "Missing auto script_valid test: " + test.GetComment());
|
||||
}
|
||||
#endif
|
||||
strGen += str + ",\n";
|
||||
}
|
||||
|
||||
#ifdef UPDATE_JSON_TESTS
|
||||
|
@ -1056,8 +1056,6 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||
innerUsage += memusage::DynamicUsage(links.parents) + memusage::DynamicUsage(links.children);
|
||||
bool fDependsWait = false;
|
||||
setEntries setParentCheck;
|
||||
int64_t parentSizes = 0;
|
||||
unsigned int parentSigOpCount = 0;
|
||||
for (const CTxIn &txin : tx.vin) {
|
||||
// Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
|
||||
indexed_transaction_set::const_iterator it2 = mapTx.find(txin.prevout.hash);
|
||||
@ -1065,10 +1063,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||
const CTransaction& tx2 = it2->GetTx();
|
||||
assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
|
||||
fDependsWait = true;
|
||||
if (setParentCheck.insert(it2).second) {
|
||||
parentSizes += it2->GetTxSize();
|
||||
parentSigOpCount += it2->GetSigOpCount();
|
||||
}
|
||||
setParentCheck.insert(it2);
|
||||
} else {
|
||||
assert(pcoins->HaveCoin(txin.prevout));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user