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

@@ -54,11 +54,11 @@ public:
class CInPoint
{
public:
CTransaction* ptx;
const CTransaction* ptx;
unsigned int n;
CInPoint() { SetNull(); }
CInPoint(CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; }
CInPoint(const CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; }
void SetNull() { ptx = NULL; n = (unsigned int) -1; }
bool IsNull() const { return (ptx == NULL && n == (unsigned int) -1); }
};
@@ -226,6 +226,9 @@ public:
// GetValueIn() is a method on CCoinsViewCache, because
// inputs must be known to compute value in.
// Compute priority, given priority of inputs and (optionally) tx size
double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const;
bool IsCoinBase() const
{
return (vin.size() == 1 && vin[0].prevout.IsNull());