Skip to content

Commit 71f1d9f

Browse files
committed
Modify variable names for entry height and priority
1 parent 5945819 commit 71f1d9f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/txmempool.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
using namespace std;
2020

2121
CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
22-
int64_t _nTime, double _dPriority,
23-
unsigned int _nHeight, bool poolHasNoInputsOf):
24-
tx(_tx), nFee(_nFee), nTime(_nTime), dPriority(_dPriority), nHeight(_nHeight),
22+
int64_t _nTime, double _entryPriority,
23+
unsigned int _entryHeight, bool poolHasNoInputsOf):
24+
tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
2525
hadNoDependencies(poolHasNoInputsOf)
2626
{
2727
nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
@@ -42,8 +42,8 @@ double
4242
CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
4343
{
4444
CAmount nValueIn = tx.GetValueOut()+nFee;
45-
double deltaPriority = ((double)(currentHeight-nHeight)*nValueIn)/nModSize;
46-
double dResult = dPriority + deltaPriority;
45+
double deltaPriority = ((double)(currentHeight-entryHeight)*nValueIn)/nModSize;
46+
double dResult = entryPriority + deltaPriority;
4747
return dResult;
4848
}
4949

src/txmempool.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class CTxMemPoolEntry
6363
size_t nModSize; //! ... and modified size for priority
6464
size_t nUsageSize; //! ... and total memory usage
6565
int64_t nTime; //! Local time when entering the mempool
66-
double dPriority; //! Priority when entering the mempool
67-
unsigned int nHeight; //! Chain height when entering the mempool
66+
double entryPriority; //! Priority when entering the mempool
67+
unsigned int entryHeight; //! Chain height when entering the mempool
6868
bool hadNoDependencies; //! Not dependent on any other txs when it entered the mempool
6969

7070
// Information about descendants of this transaction that are in the
@@ -78,15 +78,15 @@ class CTxMemPoolEntry
7878

7979
public:
8080
CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
81-
int64_t _nTime, double _dPriority, unsigned int _nHeight, bool poolHasNoInputsOf);
81+
int64_t _nTime, double _entryPriority, unsigned int _entryHeight, bool poolHasNoInputsOf);
8282
CTxMemPoolEntry(const CTxMemPoolEntry& other);
8383

8484
const CTransaction& GetTx() const { return this->tx; }
8585
double GetPriority(unsigned int currentHeight) const;
8686
const CAmount& GetFee() const { return nFee; }
8787
size_t GetTxSize() const { return nTxSize; }
8888
int64_t GetTime() const { return nTime; }
89-
unsigned int GetHeight() const { return nHeight; }
89+
unsigned int GetHeight() const { return entryHeight; }
9090
bool WasClearAtEntry() const { return hadNoDependencies; }
9191
size_t DynamicMemoryUsage() const { return nUsageSize; }
9292

0 commit comments

Comments
 (0)