From 95c61637d5798931a702ec9a18e4867313069c51 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 26 Aug 2016 13:23:57 +0200 Subject: [PATCH] Merge #8590: Remove unused variables fa6dc9f Remove unused variables (MarcoFalke) --- src/dash-tx.cpp | 4 +--- src/init.cpp | 2 +- src/txmempool.cpp | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dash-tx.cpp b/src/dash-tx.cpp index 8f25f72cb..0a57d615c 100644 --- a/src/dash-tx.cpp +++ b/src/dash-tx.cpp @@ -392,10 +392,8 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) if (!registers.count("privatekeys")) throw runtime_error("privatekeys register variable must be set."); - bool fGivenKeys = false; CBasicKeyStore tempKeystore; UniValue keysObj = registers["privatekeys"]; - fGivenKeys = true; for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) { if (!keysObj[kidx].isStr()) @@ -450,7 +448,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) // if redeemScript given and private keys given, // add redeemScript to the tempKeystore so it can be signed: - if (fGivenKeys && scriptPubKey.IsPayToScriptHash() && + if (scriptPubKey.IsPayToScriptHash() && prevOut.exists("redeemScript")) { UniValue v = prevOut["redeemScript"]; vector rsData(ParseHexUV(v, "redeemScript")); diff --git a/src/init.cpp b/src/init.cpp index cc7a884f6..d83290a8e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1373,8 +1373,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP); fRelayTxes = !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY); - bool fBound = false; if (fListen) { + bool fBound = false; if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) { BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-bind"]) { CService addrBind; diff --git a/src/txmempool.cpp b/src/txmempool.cpp index b3bf5a567..64be80c2b 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -695,7 +695,6 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem void CTxMemPool::removeConflicts(const CTransaction &tx, std::list& removed) { // Remove transactions which depend on inputs of tx, recursively - list result; LOCK(cs); BOOST_FOREACH(const CTxIn &txin, tx.vin) { auto it = mapNextTx.find(txin.prevout);