diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -482,7 +482,7 @@ class CInputCoin { public: - CInputCoin(const CWalletTx *walletTx, unsigned int i) : wtx(walletTx) { + CInputCoin(const CWalletTx *walletTx, unsigned int i) { if (!walletTx) { throw std::invalid_argument("walletTx should not be null"); } @@ -496,7 +496,6 @@ COutPoint outpoint; CTxOut txout; - const CWalletTx *wtx; bool operator<(const CInputCoin &rhs) const { return outpoint < rhs.outpoint; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2987,7 +2987,6 @@ nValueToSelect += nFeeRet; } - double dPriority = 0; // vouts to the payees for (const auto &recipient : vecSend) { CTxOut txout(recipient.nAmount, recipient.scriptPubKey); @@ -3036,22 +3035,6 @@ } } - for (const auto &pcoin : setCoins) { - Amount nCredit = pcoin.txout.nValue; - // The coin age after the next block (depth+1) is used instead - // of the current, reflecting an assumption the user would - // accept a bit more delay for a chance at a free transaction. - // But mempool inputs might still be in the mempool, so their - // age stays 0. - int age = pcoin.wtx->GetDepthInMainChain(); - assert(age >= 0); - if (age != 0) { - age += 1; - } - - dPriority += (age * nCredit) / SATOSHI; - } - const Amount nChange = nValueIn - nValueToSelect; if (nChange > Amount::zero()) { // Fill a vout to ourself. @@ -3125,7 +3108,6 @@ CTransaction txNewConst(txNew); unsigned int nBytes = txNewConst.GetTotalSize(); - dPriority = txNewConst.ComputePriority(dPriority, nBytes); // Remove scriptSigs to eliminate the fee calculation dummy // signatures.