Skip to content

Commit 12892db

Browse files
committed
Merge #8590: Remove unused variables
fa6dc9f Remove unused variables (MarcoFalke)
2 parents 6583737 + fa6dc9f commit 12892db

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

src/bitcoin-tx.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,8 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
395395

396396
if (!registers.count("privatekeys"))
397397
throw runtime_error("privatekeys register variable must be set.");
398-
bool fGivenKeys = false;
399398
CBasicKeyStore tempKeystore;
400399
UniValue keysObj = registers["privatekeys"];
401-
fGivenKeys = true;
402400

403401
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) {
404402
if (!keysObj[kidx].isStr())
@@ -454,7 +452,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
454452

455453
// if redeemScript given and private keys given,
456454
// add redeemScript to the tempKeystore so it can be signed:
457-
if (fGivenKeys && (scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
455+
if ((scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
458456
prevOut.exists("redeemScript")) {
459457
UniValue v = prevOut["redeemScript"];
460458
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11831183
fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP);
11841184
fRelayTxes = !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
11851185

1186-
bool fBound = false;
11871186
if (fListen) {
1187+
bool fBound = false;
11881188
if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
11891189
BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-bind"]) {
11901190
CService addrBind;

src/txmempool.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
576576
void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
577577
{
578578
// Remove transactions which depend on inputs of tx, recursively
579-
list<CTransaction> result;
580579
LOCK(cs);
581580
BOOST_FOREACH(const CTxIn &txin, tx.vin) {
582581
auto it = mapNextTx.find(txin.prevout);

src/wallet/wallet.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
24612461
AddToWallet(wtxNew);
24622462

24632463
// Notify that old coins are spent
2464-
set<CWalletTx*> setCoins;
24652464
BOOST_FOREACH(const CTxIn& txin, wtxNew.vin)
24662465
{
24672466
CWalletTx &coin = mapWallet[txin.prevout.hash];

0 commit comments

Comments
 (0)