aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-08-26 13:23:57 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-08-26 13:24:12 +0200
commit12892dbb9fb6d6f46505d7b9caf8ae6905601c7f (patch)
treeab45b4993516c16e963964d2e6a91e24d10f5ce6
parent65837375d98b3e9949d15dc05e66e6356eada283 (diff)
parentfa6dc9f0e5eac8ec473b63adfd43635005778f46 (diff)
Merge #8590: Remove unused variables
fa6dc9f Remove unused variables (MarcoFalke)
-rw-r--r--src/bitcoin-tx.cpp4
-rw-r--r--src/init.cpp2
-rw-r--r--src/txmempool.cpp1
-rw-r--r--src/wallet/wallet.cpp1
4 files changed, 2 insertions, 6 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 8e8ac47455..5cf9b043ea 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -395,10 +395,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())
@@ -454,7 +452,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() || scriptPubKey.IsPayToWitnessScriptHash()) &&
+ if ((scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
prevOut.exists("redeemScript")) {
UniValue v = prevOut["redeemScript"];
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
diff --git a/src/init.cpp b/src/init.cpp
index 13c68e512a..65ae4dbd9d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1183,8 +1183,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 b631c48484..0a00d757a2 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -576,7 +576,6 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
{
// Remove transactions which depend on inputs of tx, recursively
- list<CTransaction> result;
LOCK(cs);
BOOST_FOREACH(const CTxIn &txin, tx.vin) {
auto it = mapNextTx.find(txin.prevout);
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 769322969d..10aca2e499 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2461,7 +2461,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
AddToWallet(wtxNew);
// Notify that old coins are spent
- set<CWalletTx*> setCoins;
BOOST_FOREACH(const CTxIn& txin, wtxNew.vin)
{
CWalletTx &coin = mapWallet[txin.prevout.hash];