mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
Remove unused variables
This commit is contained in:
parent
d26234a9e2
commit
fa6dc9f0e5
@ -395,10 +395,8 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
|
|||||||
|
|
||||||
if (!registers.count("privatekeys"))
|
if (!registers.count("privatekeys"))
|
||||||
throw runtime_error("privatekeys register variable must be set.");
|
throw runtime_error("privatekeys register variable must be set.");
|
||||||
bool fGivenKeys = false;
|
|
||||||
CBasicKeyStore tempKeystore;
|
CBasicKeyStore tempKeystore;
|
||||||
UniValue keysObj = registers["privatekeys"];
|
UniValue keysObj = registers["privatekeys"];
|
||||||
fGivenKeys = true;
|
|
||||||
|
|
||||||
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) {
|
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) {
|
||||||
if (!keysObj[kidx].isStr())
|
if (!keysObj[kidx].isStr())
|
||||||
@ -454,7 +452,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
|
|||||||
|
|
||||||
// if redeemScript given and private keys given,
|
// if redeemScript given and private keys given,
|
||||||
// add redeemScript to the tempKeystore so it can be signed:
|
// add redeemScript to the tempKeystore so it can be signed:
|
||||||
if (fGivenKeys && (scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
|
if ((scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
|
||||||
prevOut.exists("redeemScript")) {
|
prevOut.exists("redeemScript")) {
|
||||||
UniValue v = prevOut["redeemScript"];
|
UniValue v = prevOut["redeemScript"];
|
||||||
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
|
vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
|
||||||
|
@ -1183,8 +1183,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP);
|
fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP);
|
||||||
fRelayTxes = !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
|
fRelayTxes = !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
|
||||||
|
|
||||||
bool fBound = false;
|
|
||||||
if (fListen) {
|
if (fListen) {
|
||||||
|
bool fBound = false;
|
||||||
if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
|
if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
|
||||||
BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-bind"]) {
|
BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-bind"]) {
|
||||||
CService addrBind;
|
CService addrBind;
|
||||||
|
@ -576,7 +576,6 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
|
|||||||
void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
|
void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
|
||||||
{
|
{
|
||||||
// Remove transactions which depend on inputs of tx, recursively
|
// Remove transactions which depend on inputs of tx, recursively
|
||||||
list<CTransaction> result;
|
|
||||||
LOCK(cs);
|
LOCK(cs);
|
||||||
BOOST_FOREACH(const CTxIn &txin, tx.vin) {
|
BOOST_FOREACH(const CTxIn &txin, tx.vin) {
|
||||||
auto it = mapNextTx.find(txin.prevout);
|
auto it = mapNextTx.find(txin.prevout);
|
||||||
|
@ -2461,7 +2461,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
|
|||||||
AddToWallet(wtxNew);
|
AddToWallet(wtxNew);
|
||||||
|
|
||||||
// Notify that old coins are spent
|
// Notify that old coins are spent
|
||||||
set<CWalletTx*> setCoins;
|
|
||||||
BOOST_FOREACH(const CTxIn& txin, wtxNew.vin)
|
BOOST_FOREACH(const CTxIn& txin, wtxNew.vin)
|
||||||
{
|
{
|
||||||
CWalletTx &coin = mapWallet[txin.prevout.hash];
|
CWalletTx &coin = mapWallet[txin.prevout.hash];
|
||||||
|
Loading…
Reference in New Issue
Block a user