diff --git a/src/coins.h b/src/coins.h --- a/src/coins.h +++ b/src/coins.h @@ -291,14 +291,6 @@ //! set represented by this view bool HaveInputs(const CTransaction &tx) const; - /** - * Return priority of tx at height nHeight. Also calculate the sum of the - * values of the inputs that are already in the chain. These are the inputs - * that will age and increase priority as new blocks are added to the chain. - */ - double GetPriority(const CTransaction &tx, int nHeight, - Amount &inChainInputValue) const; - const CTxOut &GetOutputFor(const CTxIn &input) const; private: diff --git a/src/coins.cpp b/src/coins.cpp --- a/src/coins.cpp +++ b/src/coins.cpp @@ -311,27 +311,6 @@ return true; } -double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight, - Amount &inChainInputValue) const { - inChainInputValue = Amount::zero(); - if (tx.IsCoinBase()) { - return 0.0; - } - double dResult = 0.0; - for (const CTxIn &txin : tx.vin) { - const Coin &coin = AccessCoin(txin.prevout); - if (coin.IsSpent()) { - continue; - } - if (int64_t(coin.GetHeight()) <= nHeight) { - dResult += double(coin.GetTxOut().nValue / SATOSHI) * - (nHeight - coin.GetHeight()); - inChainInputValue += coin.GetTxOut().nValue; - } - } - return tx.ComputePriority(dResult); -} - // TODO: merge with similar definition in undo.h. static const size_t MAX_OUTPUTS_PER_TX = MAX_TX_SIZE / ::GetSerializeSize(CTxOut(), PROTOCOL_VERSION);