Add verbose boolean to getrawmempool

Also changes mempool to store CTxMemPoolEntries
to keep track of when they enter/exit the pool.
This commit is contained in:
Gavin Andresen
2013-11-11 17:35:14 +10:00
parent 0733c1bde6
commit 4d707d5120
12 changed files with 212 additions and 76 deletions

View File

@@ -1342,15 +1342,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& 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);