From 4d707d512070ed88c888fdf625c0ae0f85f68d9b Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 11 Nov 2013 17:35:14 +1000 Subject: Add verbose boolean to getrawmempool Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool. --- src/wallet.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/wallet.cpp') diff --git a/src/wallet.cpp b/src/wallet.cpp index 46d6cc566..b9110d127 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1342,15 +1342,7 @@ bool CWallet::CreateTransaction(const vector >& vecSend, strFailReason = _("Transaction too large"); return false; } - unsigned int nTxSizeMod = nBytes; - // See miner.c's dPriority logic for the matching network-node side code. - BOOST_FOREACH(const CTxIn& txin, (*(CTransaction*)&wtxNew).vin) - { - unsigned int offset = 41U + min(110U, (unsigned int)txin.scriptSig.size()); - if (nTxSizeMod > offset) - nTxSizeMod -= offset; - } - dPriority /= nTxSizeMod; + dPriority = wtxNew.ComputePriority(dPriority, nBytes); // Check that enough fee is included int64_t nPayFee = nTransactionFee * (1 + (int64_t)nBytes / 1000); -- cgit v1.2.3