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/core.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index 7b4c6af319..e61cad90ec 100644 --- a/src/core.h +++ b/src/core.h @@ -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()); -- cgit v1.2.3